Skip to content

Commit

Permalink
Compile package translations for use in the portal
Browse files Browse the repository at this point in the history
  • Loading branch information
skapur12 committed Sep 6, 2023
1 parent b6083f2 commit f4c8ced
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/build-localization-locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ To build the localization translations for all languages besides English:
* Run `npm run loc:build` to build the translations, move them to the package directories, and combine them altogether in one directory
* Run `npm run build-translations` to build the full, compiled translations for the web and desktop packages

* `web/dev-server/resources/i18n` contains web translations (web + all packages)
* `web/resources/i18n` contains web translations (web + all packages)
* `desktop/resources/i18n` contains desktop translations (desktop + all packages)
1 change: 1 addition & 0 deletions packages/bonito-core/i18n/resources.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"bonito.core.form.validation.invalidEnumValue": "Invalid value",
"bonito.core.form.validation.stringValueError": "Value must be a string",
"bonito.core.learnMoreLinkText": "Learn more",
"bonito.core.newAccount": "New Batch account",
"bonito.core.notApplicable": "N/A",
"bonito.core.save": "Save",
"bonito.core.storage-account.error": "No storage accounts in subscription."
Expand Down
2 changes: 1 addition & 1 deletion packages/bonito-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"clean:build": "bux rmrf ./build",
"clean:esm": "bux rmrf ./lib",
"clean:cjs": "bux rmrf ./lib-cjs",
"clean:generated": "bux rmrf ./src/ui-common/generated",
"clean:generated": "bux rmrf ./src/generated",
"test": "jest",
"test:coverage": "jest --collect-coverage",
"test:all": "npm run test:coverage",
Expand Down
1 change: 1 addition & 0 deletions packages/bonito-core/src/common.i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ close: Close
learnMoreLinkText: Learn more
notApplicable: N/A
save: Save
newAccount: New Batch account
3 changes: 2 additions & 1 deletion packages/playground/i18n/resources.resjson
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"lib.playground.checkbox.disabled": "Disabled status",
"lib.playground.checkbox.label": "Checkbox Label",
"lib.playground.checkbox.placement": "Checkbox placement"
"lib.playground.checkbox.placement": "Checkbox placement",
"lib.playground.demo.title": "Playground Blade"
}
2 changes: 2 additions & 0 deletions packages/playground/src/demo/demo.i18n.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
demo:
title: Playground Blade
1 change: 1 addition & 0 deletions util/bux/translation-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const writeFile = promisify(fs.writeFile);
const readFileAsync = promisify(fs.readFile);
const writeFileAsync = promisify(fs.writeFile);

// Generate bundled translations for web and desktop directories
export async function mergeAllTranslations(outputPath: string) {
const currentDirectory = process.cwd();
const rootDir = path.resolve(currentDirectory, "..");
Expand Down

0 comments on commit f4c8ced

Please sign in to comment.