Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: localization framework and pseudolocalization #3913

Merged
merged 74 commits into from
Sep 12, 2020

Conversation

beyackle
Copy link
Contributor

@beyackle beyackle commented Aug 26, 2020

Description

This adds in the ability to swap between locales in User Settings, along with a pseudo-locale to be used for testing purposes.

  • Should the "pseudo" locale files be removed? They're not needed by the client, but might be useful for other people developing new features (so they can run the yarn:l10n script and check they didn't forget any formatMessage calls themselves) -- removed the pseudo locale files, but left in the script to generate them. Their entry in the user settings is now commented out by default. Developers who are adding strings should run yarn l10n to regenerate the locale files; there's a check now to add the pseudo-locale and "does not exist" locale to the settings box in non-prod settings.
  • We need a new icon for the settings menu's "User Locale" setting.
    -- Done, thanks to Vivek on the design team
  • I had to comment out some error handling in the server. This should be added back in a way that doesn't break things.
    -- Fixed (I discovered how to do this on my own)

Task Item

closes #3809

Screenshots

MicrosoftTeams-image (2)

Composer/packages/client/src/App.tsx Outdated Show resolved Hide resolved
@@ -264,7 +265,7 @@ export class BotProject implements IBotProject {

return {
sdk: {
content: sdkSchema,
content: merge(sdkSchema, uiSchemaOverrides),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look right. We should not merge the ui schema into the sdk schema.

'manifests/*.json',
'sdk.override.uischema',
'sdk.schema',
'sdk.uischema',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That happens in the constructor though right?

@cwhitten cwhitten merged commit 9cbec03 into main Sep 12, 2020
@cwhitten cwhitten deleted the beyackle/l10n-mock branch September 12, 2020 04:41
@beyackle beyackle mentioned this pull request Sep 23, 2020
@cwhitten cwhitten mentioned this pull request Nov 13, 2020
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
* create l10n-extract script

* Update l10n-extract.js

* clean up code and move files into own directory

* rename files

* Update l10n-extract.js

* refactor utils and fix small bug

* add pseudol10n for client locales file

* add pseudolocalization

* Update index.tsx

* Update botProject.ts

* transform other files

* move locales into src

* unify .json files

* move format-message and other fixes

* merge in settings dropdown

* almost-working locale serverside locale swap

* Update App.tsx

* fix server silliness

* move locale-loading to dispatcher

* Update user.ts

* fix scripts

* remove stray files

* make serverside schemas mostly work

* Update dialogUtil.ts

* use override files

* WIP on schema override reading

* fix filename typo

* Update botProject.ts

* move loadLocale out and use for init

* fix l10n script

* fix typo

* delay concept labels

* Update viewUtils.ts

* Update package.json

* update tests (still WIP)

* Update fileUtil.test.js

* fix loadLocale tests

* Update .gitignore

* remove pseudo files

* fix design of settings

* Update AppSettings.tsx

* Update en-US.json

* fix CR issues and move schema files

* add l10n to build scripts

This might be why the e2e step is failing; it wasn't creating the schema files that get copied over into new projects by default.

* Update botProject.ts

* resolve node-forge to 0.10 for security thing

* Update LuisDeploy.spec.ts

* fixes from CR

* Update botProject.ts

* rebuild files

* post-merge fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Localization/Internationalization
4 participants