Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants