Move translations to "translations" folder.
This commit is contained in:
parent
a5a21cf2d4
commit
a265597dae
|
@ -74,7 +74,7 @@ jobs:
|
||||||
- name: Clear existing locales.
|
- name: Clear existing locales.
|
||||||
if: github.event_name == 'push' || github.event_name == 'schedule'
|
if: github.event_name == 'push' || github.event_name == 'schedule'
|
||||||
run: |
|
run: |
|
||||||
rm -rf resources/locale/*.UTF-8
|
rm -rf translations/*.UTF-8
|
||||||
|
|
||||||
- name: Generate new translations from existing code.
|
- name: Generate new translations from existing code.
|
||||||
if: github.event_name == 'push' || github.event_name == 'schedule'
|
if: github.event_name == 'push' || github.event_name == 'schedule'
|
||||||
|
@ -152,7 +152,7 @@ jobs:
|
||||||
name: assets
|
name: assets
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
path: |
|
path: |
|
||||||
resources/locale
|
translations
|
||||||
web/static/dist
|
web/static/dist
|
||||||
web/static/webpack_dist
|
web/static/webpack_dist
|
||||||
web/static/webpack.json
|
web/static/webpack.json
|
||||||
|
|
|
@ -4,5 +4,5 @@ api_token_env: CROWDIN_PERSONAL_TOKEN
|
||||||
preserve_hierarchy: true
|
preserve_hierarchy: true
|
||||||
|
|
||||||
files:
|
files:
|
||||||
- source: /resources/locale/default.pot
|
- source: /translations/default.pot
|
||||||
translation: /resources/locale/%locale_with_underscore%.UTF-8/LC_MESSAGES/default.po
|
translation: /translations/%locale_with_underscore%.UTF-8/LC_MESSAGES/default.po
|
||||||
|
|
|
@ -2,10 +2,6 @@ services:
|
||||||
web:
|
web:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
# Control wether Liquidsoap should be built from source via OPAM or download the
|
|
||||||
# pre-built .deb file from the Liquidsoap GitHub Releases on ARM based machines
|
|
||||||
# args:
|
|
||||||
# ARM_FULL_BUILD: true
|
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:3306:3306"
|
- "127.0.0.1:3306:3306"
|
||||||
- "127.0.0.1:6379:6379"
|
- "127.0.0.1:6379:6379"
|
||||||
|
|
|
@ -6,7 +6,7 @@ services:
|
||||||
user: "${AZURACAST_PUID:-1000}:${AZURACAST_PGID:-1000}"
|
user: "${AZURACAST_PUID:-1000}:${AZURACAST_PGID:-1000}"
|
||||||
volumes:
|
volumes:
|
||||||
- $PWD/frontend:/data/frontend
|
- $PWD/frontend:/data/frontend
|
||||||
- $PWD/resources/locale:/data/resources/locale
|
- $PWD/translations:/data/translations
|
||||||
- $PWD/web/static:/data/web/static
|
- $PWD/web/static:/data/web/static
|
||||||
- frontend_node_modules:/data/frontend/node_modules
|
- frontend_node_modules:/data/frontend/node_modules
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ RUN apk update \
|
||||||
|
|
||||||
RUN groupdel dialout
|
RUN groupdel dialout
|
||||||
|
|
||||||
RUN mkdir -p /data/frontend/node_modules /data/resources/locale /data/web/static \
|
RUN mkdir -p /data/frontend/node_modules /data/translations /data/web/static \
|
||||||
&& chown -R node:node /data
|
&& chown -R node:node /data
|
||||||
|
|
||||||
RUN USER=node && \
|
RUN USER=node && \
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
"name": "azuracast",
|
"name": "azuracast",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "gulp",
|
"build" : "gulp",
|
||||||
"watch": "gulp watch",
|
"watch" : "gulp watch",
|
||||||
"generate-locales": "gettext-extract --attribute v-translate --keywords '$gettext' --output ../resources/locale/frontend.pot $(find ./vue -type f -name '*.vue')",
|
"generate-locales" : "gettext-extract --attribute v-translate --keywords '$gettext' --output ../translations/frontend.pot $(find ./vue -type f -name '*.vue')",
|
||||||
"import-locales": "gettext-compile --output ../resources/locale/translations.json $(find ../resources/locale/*.UTF-8/LC_MESSAGES -type f -name 'default.po')"
|
"import-locales" : "gettext-compile --output ../translations/translations.json $(find ../translations/*.UTF-8/LC_MESSAGES -type f -name 'default.po')"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.15.5",
|
"@babel/core": "^7.15.5",
|
||||||
|
|
|
@ -37,7 +37,7 @@ final class GenerateCommand extends CommandAbstract
|
||||||
$io = new SymfonyStyle($input, $output);
|
$io = new SymfonyStyle($input, $output);
|
||||||
$io->title('Generate Locales');
|
$io->title('Generate Locales');
|
||||||
|
|
||||||
$exportDir = $this->environment->getBaseDirectory() . '/resources/locale';
|
$exportDir = $this->environment->getBaseDirectory() . '/translations';
|
||||||
|
|
||||||
$translations = Translations::create('default');
|
$translations = Translations::create('default');
|
||||||
$destFile = $exportDir . '/default.pot';
|
$destFile = $exportDir . '/default.pot';
|
||||||
|
|
|
@ -32,7 +32,7 @@ final class ImportCommand extends CommandAbstract
|
||||||
$io = new SymfonyStyle($input, $output);
|
$io = new SymfonyStyle($input, $output);
|
||||||
$io->title('Import Locales');
|
$io->title('Import Locales');
|
||||||
|
|
||||||
$localesBase = $this->environment->getBaseDirectory() . '/resources/locale';
|
$localesBase = $this->environment->getBaseDirectory() . '/translations';
|
||||||
|
|
||||||
$supportedLocales = SupportedLocales::cases();
|
$supportedLocales = SupportedLocales::cases();
|
||||||
$defaultLocale = SupportedLocales::default();
|
$defaultLocale = SupportedLocales::default();
|
||||||
|
|
|
@ -68,7 +68,7 @@ enum SupportedLocales: string
|
||||||
$translator = Loader::getInstance();
|
$translator = Loader::getInstance();
|
||||||
$translator->setlocale($this->value);
|
$translator->setlocale($this->value);
|
||||||
$translator->textdomain('default');
|
$translator->textdomain('default');
|
||||||
$translator->bindtextdomain('default', $environment->getBaseDirectory() . '/resources/locale');
|
$translator->bindtextdomain('default', $environment->getBaseDirectory() . '/translations');
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader::loadFunctions();
|
Loader::loadFunctions();
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue