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

fix: add check script for l10n files #5528

Merged
merged 5 commits into from
Jan 14, 2021
Merged

Conversation

beyackle
Copy link
Contributor

Description

This PR is to add a new "l10nCheck" script and associated yarn command which will inspect the locale files in packages/server/src/locales and find issues that tend to occur in them:

  • Whitespace between the number and the = in a "plural" definition
  • Missing "other" clause in a "plural" definition (this usually happens because a translator turns the word "other" into its translation in the target language)
  • Single quotes (') between letters; single quotes are semantic to ICU formatting and should be replaced by curly quotes in actual messages

This won't catch every possible issue, but it should be used as a starting point to find the most common errors.

Task Item

refs #5496

const fs = require('fs');
const path = require('path');

const localePath = 'packages/server/src/locales';
Copy link
Contributor

Choose a reason for hiding this comment

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

does this need to be normalized for Windows?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm running this on a Windows machine and it worked fine.

@coveralls
Copy link

coveralls commented Jan 14, 2021

Coverage Status

Coverage remained the same at 55.065% when pulling a5488c4 on beyackle/l10n_checkScript into 713ed91 on main.

@beyackle beyackle merged commit 2d28769 into main Jan 14, 2021
@beyackle beyackle deleted the beyackle/l10n_checkScript branch January 14, 2021 21:19
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
* add check script for l10n files

* Update l10nCheck.js

* Update fr.json
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.

3 participants