Skip to content

Commit

Permalink
chore: Update translations script to special case en-GB (#8106)
Browse files Browse the repository at this point in the history
* chore: Update translations needed script to special case en-GB

* update translateions needed
  • Loading branch information
mister-ben committed Feb 21, 2023
1 parent a27ee05 commit 55cd188
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
9 changes: 9 additions & 0 deletions build/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ filepaths.forEach((filepath) => {
}

const target = require(filepath);

// Special case for English, the assumption being that since the keys are English only
// a few strings need to be altered for regional differences, e.g. en-GB.
if (filename.startsWith('en-')) {
console.log(`${filename} English - should be manually checked.`);
tableData.push([`${filename} (has ${Object.keys(target).length})`, 'Needs manual checking. Can safely use most default strings.']);
return;
}

const missing = [];

for (const string in source) {
Expand Down
17 changes: 2 additions & 15 deletions docs/translations-needed.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ This default value is hardcoded as a default to the localize method in the SeekB
| | Opacity |
| | Text Background |
| | Caption Area Background |
| en-GB.json (has 1) | Needs manual checking. Can safely use most default strings.
| es.json (Complete) | |
| et.json (missing 5) | No content |
| | Color |
Expand Down Expand Up @@ -775,21 +776,7 @@ This default value is hardcoded as a default to the localize method in the SeekB
| | Opacity |
| | Text Background |
| | Caption Area Background |
| tr.json (missing 18) | Audio Player |
| | Video Player |
| | Seek to live, currently behind live |
| | Seek to live, currently playing live |
| | Progress Bar |
| | progress bar timing: currentTime={1} duration={2} |
| | Volume Level |
| | Reset |
| | restore all settings to the default values |
| | End of dialog window. |
| | {1} is loading. |
| | Exit Picture-in-Picture |
| | Picture-in-Picture |
| | No content |
| | Color |
| tr.json (missing 4) | Color |
| | Opacity |
| | Text Background |
| | Caption Area Background |
Expand Down
4 changes: 4 additions & 0 deletions lang/en-GB.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"Color": "Colour"
}

0 comments on commit 55cd188

Please sign in to comment.