Skip to content

Commit

Permalink
feat(FEC-9465): internationalization (i18n) - player localization (#485)
Browse files Browse the repository at this point in the history
* Move `translations` folder to the root to be available to kaltura-player (kaltura/kaltura-player-js#304)
* Add French translation 

Solves FEC-9465
  • Loading branch information
TasvirChi authored and tasvirchi-gitaction committed Feb 16, 2020
1 parent 2d61c11 commit efa78cf
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 99 deletions.
2 changes: 1 addition & 1 deletion docs/translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ A sample English dictionary may look like:
}
```

For complete translation reference see [here](../src/translations/en.json).
For complete translation reference see [here](../translations/en.json).

Default locale is English.

Expand Down
96 changes: 0 additions & 96 deletions src/translations/en.json

This file was deleted.

4 changes: 2 additions & 2 deletions src/ui-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {EventType} from './event/event-type';
import {setEnv} from './utils/key-map';
import {ContainerProvider} from './components/container';
import reducer from './store';
import en_translations from './translations/en.json';
import en_translations from '../translations/en.i18n.json';
import {actions as configActions} from './reducers/config';

// core components for the UI
Expand Down Expand Up @@ -39,7 +39,7 @@ class UIManager {
store: any;
container: ?HTMLElement;
root: React$Component<any, any, any>;
_translations: {[langKey: string]: Object} = {en: en_translations};
_translations: {[langKey: string]: Object} = {en: en_translations['en']};
_locale: string = 'en';
_uiComponents: Array<PKUIComponent>;

Expand Down
98 changes: 98 additions & 0 deletions translations/en.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"en": {
"controls": {
"play": "Play",
"pause": "Pause",
"share": "Share",
"language": "Language",
"settings": "Settings",
"fullscreen": "Fullscreen",
"rewind": "Seek backwards",
"forward": "Seek forward",
"vrStereo": "vrStereo",
"live": "Live",
"mute": "Mute",
"unmute": "Unmute",
"next": "Next",
"prev": "Prev",
"startOver": "Start over",
"pictureInPicture": "Picture in picture",
"logo": "Logo",
"seekBarSlider": "Seek slider"
},
"unmute": {
"unmute": "Unmute"
},
"copy": {
"button": "Copy URL"
},
"settings": {
"title": "Settings",
"quality": "Quality",
"speed": "Speed",
"speedNormal": "Normal"
},
"language": {
"title": "Language",
"audio": "Audio",
"captions": "Captions",
"advanced_captions_settings": "Advanced captions settings"
},
"share": {
"title": "Share",
"embed_options": "Embed Options",
"start_video_at": "Start video at",
"email": "Share on Email",
"embed": "Get embed code"
},
"overlay": {
"close": "Close"
},
"error": {
"default_error": "Something went wrong",
"default_session_text": "Session ID",
"retry": "Retry"
},
"ads": {
"ad_notice": "Advertisement",
"learn_more": "Learn more",
"skip_ad": "Skip ad",
"skip_in": "Skip in"
},
"cvaa": {
"title": "Advanced captions settings",
"sample_caption_tag": "Sample",
"sample_custom_caption_tag": "Custom captions",
"set_custom_caption": "Set custom caption",
"edit_caption": "Edit caption",
"size_label": "Size",
"font_color_label": "Font color",
"font_family_label": "Font family",
"font_style_label": "Font style",
"font_opacity_label": "Font opacity",
"background_color_label": "Background color",
"background_opacity_label": "Background opacity",
"apply": "Apply",
"caption_preview": "This is your caption preview"
},
"cast": {
"play_on_tv": "Play on TV",
"disconnect_from_tv": "Disconnect from TV",
"status": {
"connecting_to": "Connecting to",
"connected_to": "Connected to",
"playing_on": "Playing on"
}
},
"playlist": {
"prev": "Previous",
"next": "Next",
"up_next": "Up Next",
"cancel": "Cancel"
},
"pictureInPicture": {
"overlay_text": "Playing in Picture In Picture mode",
"overlay_button": "Play Here"
}
}
}
24 changes: 24 additions & 0 deletions translations/fr.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"fr": {
"controls": {
"play": "Jouer",
"pause": "Pauser",
"share": "Partager",
"language": "Langue",
"settings": "Réglages",
"fullscreen": "Plein écran",
"rewind": "Recherche en arrière",
"forward": "Aller de l'avant",
"vrStereo": "vrStéréo",
"live": "Vivre",
"mute": "Muet",
"unmute": "Réactiver",
"next": "Suivant",
"prev": "Précédent",
"startOver": "Recommence",
"pictureInPicture": "image dans l'image",
"logo": "Logo",
"seekBarSlider": "Chercher glissière"
}
}
}

0 comments on commit efa78cf

Please sign in to comment.