Permalink
Browse files

Refactored plural method based on PluralForm.jsm and added plural for…

…m indicator on each translation file to simplify matching; fixed minro issues in translation file demo
  • Loading branch information...
1 parent 25a81ee commit 014a1870ef55db3ef414cf52798b55bea7ad0884 @ron666 ron666 committed Oct 6, 2016
@@ -78,11 +78,12 @@
mejs.i18n.locale.language = lang;
$('select').on('change', function() {
- var separator = (window.location.href.indexOf("?")===-1)? "?" : "&";
- window.location.href = window.location.href + separator + "lang=" + $(this).val();
+ var url = window.location.href.replace(/^(.*?)\?.*$/, "$1");
+ window.location.href = url + "?lang=" + $(this).val();
}).val(lang);
$('audio,video').mediaelementplayer({
+ features: ['playpause','progress','volume','speed','fullscreen', 'skipback'],
success: function(player, node) {
mejs.i18n.locale.language = mejs.i18n.getLanguage();
@@ -18,7 +18,7 @@
if (typeof exports.cs === 'undefined') {
exports.cs = {
-
+ 'mejs.plural-form': 8,
'mejs.audio-player' : "Přehrávač hudby",
'mejs.captions-subtitles' : "Titulky",
'mejs.close' : "Zavřít",
@@ -18,6 +18,9 @@
if (typeof exports.de === 'undefined') {
exports.de = {
+
+ 'mejs.plural-form': 1,
+
// me-shim
'mejs.download-file': 'Datei herunterladen',
@@ -18,6 +18,10 @@
if (typeof exports.en === 'undefined') {
exports.en = {
+
+
+ 'mejs.plural-form': 1,
+
// me-shim
'mejs.download-file': 'Download File',
@@ -33,7 +37,7 @@
'mejs.fullscreen' : 'Fullscreen',
// mep-feature-jumpforward
- 'mejs.time-jump-forward': 'Jump forward {0} {0|plural:second:seconds}',
+ 'mejs.time-jump-forward': 'Jump forward 1 second;Jump forward %1 seconds',
// mep-feature-playpause
'mejs.play': 'Play',
@@ -47,7 +51,7 @@
'mejs.time-help-text': 'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.',
// mep-feature-skipback
- 'mejs.time-skip-back': 'Skip back {0} {0|plural:second:seconds}',
+ 'mejs.time-skip-back': 'Skip back 1 second;Skip back %1 seconds',
// mep-feature-tracks
'mejs.captions-subtitles' : 'Captions/Subtitles',
@@ -66,7 +70,7 @@
// mep-feature-ads
'mejs.ad-skip': 'Skip ad',
- 'mejs.ad-skip-info': 'Skip in {0} {0|plural:second:seconds}',
+ 'mejs.ad-skip-info': 'Skip in 1 second;Skip in %1 seconds',
'mejs.source-chooser': 'Source Chooser'
};
@@ -19,8 +19,9 @@
if (typeof exports.es === 'undefined') {
exports.es = {
+ 'mejs.plural-form': 1,
'mejs.ad-skip': "Saltar publicidad",
- 'mejs.ad-skip-info': "Saltar {0} {0|plural:segundo:segundos}",
+ 'mejs.ad-skip-info': "Saltar 1 segundo;Saltar %1 segundos",
'mejs.audio-player' : "Reproductor de audio",
'mejs.captions-subtitles' : "Leyendas/Subtítulos",
'mejs.close' : "Cerrar",
@@ -35,7 +36,7 @@
'mejs.pause' : "Pausa",
'mejs.play' : "Reproducción",
'mejs.time-help-text' : "Use las flechas Izquierda/Derecha para avanzar un segundo y las flechas Arriba/Abajo para avanzar diez segundos.",
- 'mejs.time-skip-back' : "Rebobinar {0} {0|plural:segundo:segundos}",
+ 'mejs.time-skip-back' : "Rebobinar 1 segundo;Rebobinar %1 segundos",
'mejs.time-slider' : "Control deslizante de tiempo",
'mejs.unmute' : "Reactivar silencio",
'mejs.video-player' : "Reproductor de video",
@@ -22,6 +22,7 @@
if (typeof exports.fr === 'undefined') {
exports.fr = {
+ 'mejs.plural-form': 2,
'mejs.ad-skip' : "Passer la publicité",
'mejs.ad-skip-info' : "Passer la publicité dans %1 secondes",
'mejs.audio-player' : "Lecteur Audio",
@@ -19,6 +19,7 @@
if (typeof exports.hu === 'undefined') {
exports.hu = {
+ 'mejs.plural-form': 1,
'mejs.audio-player' : "Audiolejátszó",
'mejs.captions-subtitles' : "Képaláírás/Feliratok",
'mejs.close' : "Bezárás",
@@ -19,6 +19,7 @@
if (typeof exports.it === 'undefined') {
exports.it = {
+ 'mejs.plural-form': 1,
'mejs.audio-player' : "Lettore Audio",
'mejs.captions-subtitles' : "Acquisizioni/sottotitoli",
'mejs.close' : "Chiudere",
@@ -19,6 +19,7 @@
if (typeof exports.ja === 'undefined') {
exports.ja = {
+ 'mejs.plural-form': 0,
'mejs.audio-player' : "オーディオプレーヤー",
'mejs.captions-subtitles' : "キャプション/字幕",
'mejs.close' : "閉じる",
@@ -19,6 +19,7 @@
if (typeof exports.ko === 'undefined') {
exports.ko = {
+ 'mejs.plural-form': 0,
'mejs.audio-player' : "오디오 플레이어",
'mejs.captions-subtitles' : "캡션/자막",
'mejs.close' : "종료",
@@ -18,6 +18,9 @@
if (typeof exports.nl === 'undefined') {
exports.nl = {
+
+ 'mejs.plural-form': 1,
+
// me-shim
'mejs.download-file': 'Bestand downloaden',
@@ -19,6 +19,7 @@
if (typeof exports.pl === 'undefined') {
exports.pl = {
+ 'mejs.plural-form': 9,
'mejs.audio-player' : "Odtwarzacz audio",
'mejs.captions-subtitles' : "Podpisy/napisy",
'mejs.close' : "Zamknij",
@@ -20,6 +20,8 @@
if (typeof exports['pt-BR'] === 'undefined') {
exports.pt = {
+
+ 'mejs.plural-form': 2,
'mejs.none' : "Sem legendas",
'mejs.unmute' : "Tirar silêncio",
'mejs.fullscreen' : "Tela inteira",
@@ -19,6 +19,7 @@
if (typeof exports.pt === 'undefined') {
exports.pt = {
+ 'mejs.plural-form': 1,
'mejs.audio-player' : "Leitor de áudio",
'mejs.captions-subtitles' : "Legendas",
'mejs.close' : "Fechar",
@@ -19,6 +19,7 @@
if (typeof exports.ro === 'undefined') {
exports.ro = {
+ 'mejs.plural-form': 5,
'mejs.audio-player' : "Player audio",
'mejs.captions-subtitles' : "Legende/Subtitrări",
'mejs.close' : "Închide",
@@ -19,6 +19,7 @@
if (typeof exports.ru === 'undefined') {
exports.ru = {
+ 'mejs.plural-form': 7,
'mejs.audio-player' : "Аудиоплеер",
'mejs.captions-subtitles' : "Титры/Субтитры",
'mejs.close' : "Закрыть",
@@ -19,6 +19,7 @@
if (typeof exports.sk === 'undefined') {
exports.sk = {
+ 'mejs.plural-form': 8,
'mejs.audio-player' : "Prehrávač zvuku",
'mejs.captions-subtitles' : "Skryté titulky/Titulky",
'mejs.close' : "Zavrieť",
@@ -19,6 +19,7 @@
if (typeof exports['zh-CN'] === 'undefined') {
exports['zh-CN'] = {
+ 'mejs.plural-form': 0,
'mejs.audio-player' : "音频播放器",
'mejs.captions-subtitles' : "字幕/标题",
'mejs.close' : "关闭",
@@ -19,6 +19,7 @@
if (typeof exports.zh === 'undefined') {
exports.zh = {
+ 'mejs.plural-form': 0,
'mejs.audio-player' : "音頻播放器",
'mejs.captions-subtitles' : "字幕/標題",
'mejs.close' : "關閉",
Oops, something went wrong.

0 comments on commit 014a187

Please sign in to comment.