Skip to content

Commit

Permalink
feat(lang): added arabic seek button translations (#8616)
Browse files Browse the repository at this point in the history
* feat(lang): added arabic seek button translations

* added localization support to skipButtons controlText
  • Loading branch information
silevitas committed Apr 12, 2024
1 parent 4ccedc1 commit ee07382
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 77 deletions.
86 changes: 12 additions & 74 deletions docs/translations-needed.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ This default value is hardcoded as a default to the localize method in the SeekB

| Language file | Missing translations |
| ----------------------- | ----------------------------------------------------------------------------------- |
| ar.json (missing 3) | Playing in Picture-in-Picture |
| | Skip backward {1} seconds |
| | Skip forward {1} seconds |
| ar.json (missing 1) | Playing in Picture-in-Picture |
| az.json (Complete) | |
| ba.json (missing 71) | Audio Player |
| | Video Player |
| | Replay |
Expand Down Expand Up @@ -169,77 +168,7 @@ This default value is hardcoded as a default to the localize method in the SeekB
| | Playing in Picture-in-Picture |
| | Skip backward {1} seconds |
| | Skip forward {1} seconds |
| ca.json (missing 71) | Audio Player |
| | Video Player |
| | Replay |
| | Seek to live, currently behind live |
| | Seek to live, currently playing live |
| | Progress Bar |
| | progress bar timing: currentTime={1} duration={2} |
| | Descriptions |
| | descriptions off |
| | Audio Track |
| | Volume Level |
| | The media is encrypted and we do not have the keys to decrypt it. |
| | Play Video |
| | Close |
| | Close Modal Dialog |
| | Modal Window |
| | This is a modal window |
| | This modal can be closed by pressing the Escape key or activating the close button. |
| | , opens captions settings dialog |
| | , opens subtitles settings dialog |
| | , opens descriptions settings dialog |
| | , selected |
| | captions settings |
| | subtitles settings |
| | descriptions settings |
| | Text |
| | White |
| | Black |
| | Red |
| | Green |
| | Blue |
| | Yellow |
| | Magenta |
| | Cyan |
| | Background |
| | Window |
| | Transparent |
| | Semi-Transparent |
| | Opaque |
| | Font Size |
| | Text Edge Style |
| | None |
| | Raised |
| | Depressed |
| | Uniform |
| | Drop shadow |
| | Font Family |
| | Proportional Sans-Serif |
| | Monospace Sans-Serif |
| | Proportional Serif |
| | Monospace Serif |
| | Casual |
| | Script |
| | Small Caps |
| | Reset |
| | restore all settings to the default values |
| | Done |
| | Caption Settings Dialog |
| | Beginning of dialog window. Escape will cancel and close the window. |
| | End of dialog window. |
| | {1} is loading. |
| | Exit Picture-in-Picture |
| | Picture-in-Picture |
| | No content |
| | Color |
| | Opacity |
| | Text Background |
| | Caption Area Background |
| | Playing in Picture-in-Picture |
| | Skip backward {1} seconds |
| | Skip forward {1} seconds |
| ca.json (Complete) | |
| cs.json (missing 12) | Seek to live, currently behind live |
| | Seek to live, currently playing live |
| | Exit Picture-in-Picture |
Expand Down Expand Up @@ -643,6 +572,15 @@ This default value is hardcoded as a default to the localize method in the SeekB
| | Playing in Picture-in-Picture |
| | Skip backward {1} seconds |
| | Skip forward {1} seconds |
| np.json (missing 9) | Drop shadow |
| | No content |
| | Color |
| | Opacity |
| | Text Background |
| | Caption Area Background |
| | Playing in Picture-in-Picture |
| | Skip backward {1} seconds |
| | Skip forward {1} seconds |
| oc.json (missing 7) | Color |
| | Opacity |
| | Text Background |
Expand Down
4 changes: 3 additions & 1 deletion lang/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,7 @@
"Color": "اللون",
"Opacity": "معدل الشفافية",
"Text Background": "خلفية النص",
"Caption Area Background": "خلفية منطقة التسمية التوضيحية"
"Caption Area Background": "خلفية منطقة التسمية التوضيحية",
"Skip forward {1} seconds": "التخطي للأمام {1}",
"Skip backward {1} seconds": "الرجوع للخلف {1}"
}
2 changes: 1 addition & 1 deletion src/js/control-bar/skip-buttons/skip-backward.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class SkipBackward extends Button {

if (this.skipTime && this.validOptions.includes(this.skipTime)) {
this.setIcon(`replay-${this.skipTime}`);
this.controlText(this.localize('Skip backward {1} seconds', [this.skipTime]));
this.controlText(this.localize('Skip backward {1} seconds', [this.skipTime.toLocaleString(player.language())]));
this.show();
} else {
this.hide();
Expand Down
2 changes: 1 addition & 1 deletion src/js/control-bar/skip-buttons/skip-forward.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class SkipForward extends Button {

if (this.skipTime && this.validOptions.includes(this.skipTime)) {
this.setIcon(`forward-${this.skipTime}`);
this.controlText(this.localize('Skip forward {1} seconds', [this.skipTime]));
this.controlText(this.localize('Skip forward {1} seconds', [this.skipTime.toLocaleString(player.language())]));
this.show();
} else {
this.hide();
Expand Down

0 comments on commit ee07382

Please sign in to comment.