-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #854 from nextcloud/enhancement/l10n
Add gettext-based translations
- Loading branch information
Showing
18 changed files
with
294 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: L10n | ||
on: pull_request | ||
|
||
jobs: | ||
l10n-extract-check: | ||
runs-on: ubuntu-latest | ||
name: Pot check | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
- name: npm install | ||
run: npm ci | ||
- name: extract l10n files | ||
run: npm run l10n:extract | ||
- name: Check l10n file changes | ||
run: bash -c "[[ ! \"`git status --porcelain l10n`\" ]] || ( echo 'Uncommited l10n changes. Run `npm l10n:extract`.' && git status && exit 1 )" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Transifex | ||
on: pull_request | ||
|
||
jobs: | ||
approve: | ||
runs-on: ubuntu-latest | ||
name: Approve | ||
steps: | ||
- uses: hmarr/[email protected] | ||
if: github.actor == 'Transifex-localization-platform[bot]' || github.actor == 'transifex-integration[bot]' | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
automerge: | ||
runs-on: ubuntu-latest | ||
name: Auto-merge | ||
steps: | ||
- uses: "pascalgn/automerge-action@ecb16453ce68e85b1e23596c8caa7e7499698a84" | ||
if: github.actor == 'Transifex-localization-platform[bot]' || github.actor == 'transifex-integration[bot]' | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
MERGE_LABELS: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
node_modules | ||
/build | ||
/l10n | ||
/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const { GettextExtractor, JsExtractors } = require('gettext-extractor'); | ||
|
||
let extractor = new GettextExtractor(); | ||
|
||
extractor | ||
.createJsParser([ | ||
JsExtractors.callExpression('t', { | ||
arguments: { | ||
text: 0, | ||
} | ||
}), | ||
JsExtractors.callExpression('n', { | ||
arguments: { | ||
text: 1, | ||
textPlural: 2, | ||
} | ||
}), | ||
]) | ||
.parseFilesGlob('./src/**/*.@(ts|js|vue)'); | ||
|
||
extractor.savePotFile('./l10n/messages.pot'); | ||
|
||
extractor.printStats(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
msgid "" | ||
msgstr "" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
|
||
#: src/components/MultiselectTags/MultiselectTags.vue:169 | ||
msgid "{tag} (invisible)" | ||
msgstr "" | ||
|
||
#: src/components/MultiselectTags/MultiselectTags.vue:172 | ||
msgid "{tag} (restricted)" | ||
msgstr "" | ||
|
||
#: src/components/ColorPicker/ColorPicker.vue:145 | ||
msgid "Choose" | ||
msgstr "" | ||
|
||
#: src/components/Modal/Modal.vue:109 | ||
msgid "Close" | ||
msgstr "" | ||
|
||
#: src/components/Modal/Modal.vue:154 | ||
msgid "Next" | ||
msgstr "" | ||
|
||
#: src/components/Multiselect/Multiselect.vue:169 | ||
#: src/components/MultiselectTags/MultiselectTags.vue:78 | ||
msgid "No results" | ||
msgstr "" | ||
|
||
#: src/components/Modal/Modal.vue:290 | ||
msgid "Pause slideshow" | ||
msgstr "" | ||
|
||
#: src/components/Modal/Modal.vue:134 | ||
msgid "Previous" | ||
msgstr "" | ||
|
||
#: src/components/MultiselectTags/MultiselectTags.vue:100 | ||
msgid "Select a tag" | ||
msgstr "" | ||
|
||
#: src/components/AppNavigationSettings/AppNavigationSettings.vue:53 | ||
msgid "Settings" | ||
msgstr "" | ||
|
||
#: src/components/Modal/Modal.vue:290 | ||
msgid "Start slideshow" | ||
msgstr "" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.