From 00442a9a7caeaf6376b2eb65e9c4f14c24534c0a Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Tue, 2 Apr 2019 11:54:35 -0700 Subject: [PATCH] Split up localization data for lazy loading This changes the format of the localization data to enable apps to trivially lazy-load translations. It also adds --locales to the build scripts to allow app developers to choose the compiled-in locales. The generated output now goes into dist/ and is not checked into revision control. Finally, it adds "description" and "meaning" fields to the source messages to allow us to more easily integrate with a context-aware human translation service. The "description" field provides application context for the translator, while the "meaning" field provides linguistic disambiguation for words with multiple meanings or parts of speech in the original English. Because the translation service wants to collapse messages with identical text, we had to merge several messages together. To this end, we have removed the prefixes "ARIA_LABEL_" and "LABEL_" from the messages themselves and collapsed what remained. Issue #1688 Change-Id: I24c17e71c73f6663cf123cfdba118c486fa80ecc --- build/all.py | 24 +- build/build.py | 28 +- build/check.py | 4 + build/compiler.py | 49 +++ build/gendeps.py | 1 + build/generateLocalizations.py | 258 +++++-------- build/locales.json | 579 ---------------------------- build/types/ui | 1 - karma.conf.js | 1 + ui/audio_language_selection.js | 8 +- ui/cast_button.js | 6 +- ui/controls.js | 9 +- ui/fast_forward_button.js | 3 +- ui/fullscreen_button.js | 3 +- ui/language_utils.js | 8 +- ui/locales.js | 683 --------------------------------- ui/locales/ar.json | 29 ++ ui/locales/de.json | 30 ++ ui/locales/en-GB.json | 30 ++ ui/locales/en.json | 30 ++ ui/locales/es-419.json | 29 ++ ui/locales/es.json | 30 ++ ui/locales/fr.json | 30 ++ ui/locales/it.json | 29 ++ ui/locales/ja.json | 30 ++ ui/locales/ko.json | 30 ++ ui/locales/nl.json | 29 ++ ui/locales/pl.json | 29 ++ ui/locales/pt-PT.json | 30 ++ ui/locales/pt.json | 30 ++ ui/locales/ru.json | 30 ++ ui/locales/source.json | 124 ++++++ ui/locales/th.json | 29 ++ ui/locales/tr.json | 29 ++ ui/locales/zh-HK.json | 30 ++ ui/locales/zh-TW.json | 29 ++ ui/locales/zh.json | 29 ++ ui/mute_button.js | 3 +- ui/overflow_menu.js | 2 +- ui/pip_button.js | 19 +- ui/presentation_time.js | 4 +- ui/resolution_selection.js | 14 +- ui/rewind_button.js | 2 +- ui/text_selection.js | 12 +- ui/volume_bar.js | 2 +- 45 files changed, 954 insertions(+), 1484 deletions(-) delete mode 100644 build/locales.json delete mode 100644 ui/locales.js create mode 100644 ui/locales/ar.json create mode 100644 ui/locales/de.json create mode 100644 ui/locales/en-GB.json create mode 100644 ui/locales/en.json create mode 100644 ui/locales/es-419.json create mode 100644 ui/locales/es.json create mode 100644 ui/locales/fr.json create mode 100644 ui/locales/it.json create mode 100644 ui/locales/ja.json create mode 100644 ui/locales/ko.json create mode 100644 ui/locales/nl.json create mode 100644 ui/locales/pl.json create mode 100644 ui/locales/pt-PT.json create mode 100644 ui/locales/pt.json create mode 100644 ui/locales/ru.json create mode 100644 ui/locales/source.json create mode 100644 ui/locales/th.json create mode 100644 ui/locales/tr.json create mode 100644 ui/locales/zh-HK.json create mode 100644 ui/locales/zh-TW.json create mode 100644 ui/locales/zh.json diff --git a/build/all.py b/build/all.py index 947a61c2c7..2fca8eee45 100755 --- a/build/all.py +++ b/build/all.py @@ -24,6 +24,7 @@ import compiler import docs import gendeps +import generateLocalizations import shakaBuildHelpers import os @@ -34,6 +35,13 @@ def main(args): description='User facing build script for building the Shaka' ' Player Project.') + parser.add_argument( + '--locales', + type=str, + nargs='+', + default=generateLocalizations.DEFAULT_LOCALES, + help='The list of locales to compile in (default %(default)r)') + parser.add_argument( '--fix', help='Automatically fix style violations.', @@ -59,6 +67,20 @@ def main(args): parsed_args = parser.parse_args(args) + # Make the dist/ folder, ignore errors. + base = shakaBuildHelpers.get_source_base() + try: + os.mkdir(os.path.join(base, 'dist')) + except OSError: + pass + + # Generate localizations before running gendeps, so the output is available + # to the deps system. + # TODO(#1858): It might be time to look at a third-party build system. + localizations = compiler.GenerateLocalizations(parsed_args.locales) + if not localizations.generate(parsed_args.force): + return 1 + if gendeps.main([]) != 0: return 1 @@ -77,7 +99,6 @@ def main(args): return 1 match = re.compile(r'.*\.less$') - base = shakaBuildHelpers.get_source_base() main_less_src = os.path.join(base, 'ui', 'controls.less') all_less_srcs = shakaBuildHelpers.get_all_files( os.path.join(base, 'ui'), match) @@ -88,6 +109,7 @@ def main(args): return 1 build_args_with_ui = ['--name', 'ui', '+@complete'] + build_args_with_ui += ['--locales'] + parsed_args.locales build_args_without_ui = ['--name', 'compiled', '+@complete', '-@ui'] if parsed_args.force: diff --git a/build/build.py b/build/build.py index 947d6fce76..41f904ba62 100755 --- a/build/build.py +++ b/build/build.py @@ -47,6 +47,7 @@ import re import compiler +import generateLocalizations import shakaBuildHelpers @@ -170,6 +171,18 @@ def add_core(self): logging.error('Cannot exclude files from core') self.include |= core_files + def has_ui(self): + """Returns True if the UI library is in the build.""" + for path in self.include: + if '/ui/' in path: + return True + return False + + def generate_localizations(self, locales, force): + localizations = compiler.GenerateLocalizations(locales) + localizations.generate(force) + self.include.add(os.path.abspath(localizations.output)) + def parse_build(self, lines, root): """Parses a Build object from the given lines of commands. @@ -238,11 +251,12 @@ def parse_build(self, lines, root): return True - def build_library(self, name, force, is_debug): + def build_library(self, name, locales, force, is_debug): """Builds Shaka Player using the files in |self.include|. Args: name: The name of the build. + locales: A list of strings of locale identifiers. force: True to rebuild, False to ignore if no changes are detected. is_debug: True to compile for debugging, false for release. @@ -251,6 +265,8 @@ def build_library(self, name, force, is_debug): """ self.add_closure() self.add_core() + if self.has_ui(): + self.generate_localizations(locales, force) if is_debug: name += '.debug' @@ -281,6 +297,13 @@ def main(args): description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) + parser.add_argument( + '--locales', + type=str, + nargs='+', + default=generateLocalizations.DEFAULT_LOCALES, + help='The list of locales to compile in (requires UI, default %(default)r)') + parser.add_argument( '--force', '-f', @@ -325,10 +348,11 @@ def main(args): return 1 name = parsed_args.name + locales = parsed_args.locales force = parsed_args.force is_debug = parsed_args.mode == 'debug' - if not custom_build.build_library(name, force, is_debug): + if not custom_build.build_library(name, locales, force, is_debug): return 1 return 0 diff --git a/build/check.py b/build/check.py index 718ec76993..8af3c1f318 100755 --- a/build/check.py +++ b/build/check.py @@ -120,6 +120,10 @@ def get(*path_components): get('third_party', 'language-mapping-list')) files.add(os.path.join(base, 'demo', 'common', 'assets.js')) + localizations = compiler.GenerateLocalizations(None) + localizations.generate(args.force) + files.add(localizations.output) + closure_opts = build.common_closure_opts + build.common_closure_defines closure_opts += build.debug_closure_opts + build.debug_closure_defines diff --git a/build/compiler.py b/build/compiler.py index be250934b4..02304c3a64 100644 --- a/build/compiler.py +++ b/build/compiler.py @@ -22,6 +22,7 @@ import shutil import subprocess +import generateLocalizations import shakaBuildHelpers @@ -354,3 +355,51 @@ def build(self, force=False): return False return True + + +class GenerateLocalizations(object): + def __init__(self, locales): + self.locales = locales + self.source_files = shakaBuildHelpers.get_all_files( + _get_source_path('ui/locales')) + self.output = _get_source_path('dist/locales.js') + + def _locales_changed(self): + # If locales is None, it means we are being called by a caller who doesn't + # care what locales are in use. This is true, for example, when we are + # running a compiler pass over the tests. + if self.locales is None: + return False + + # Find out what locales we used before. If they have changed, we must + # regenerate the output. + last_locales = None + try: + prefix = '// LOCALES: ' + with open(self.output, 'r') as f: + for line in f: + if line.startswith(prefix): + last_locales = line.replace(prefix, '').strip().split(', ') + except IOError: + # The file wasn't found or couldn't be read, so it needs to be redone. + return True + + return set(last_locales) != set(self.locales) + + def generate(self, force=False): + """Generate runtime localizations. + + Args: + force: Generate the localizations even if the inputs and locales have not + changed. + + Returns: + True on success; False on failure. + """ + + if (not force and not _must_build(self.output, self.source_files) and + not self._locales_changed()): + return True + + generateLocalizations.main(['--locales'] + self.locales) + return True diff --git a/build/gendeps.py b/build/gendeps.py index 15efff4191..07cb08ebcc 100755 --- a/build/gendeps.py +++ b/build/gendeps.py @@ -30,6 +30,7 @@ '--root_with_prefix=third_party/closure ../../../third_party/closure', '--root_with_prefix=third_party/language-mapping-list ' + '../../../third_party/language-mapping-list', + '--root_with_prefix=dist ../../../dist', ] diff --git a/build/generateLocalizations.py b/build/generateLocalizations.py index c1ba54ca2d..9f0ebf84ec 100755 --- a/build/generateLocalizations.py +++ b/build/generateLocalizations.py @@ -14,117 +14,51 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Generates Javascript to load localization data. +"""Generates Javascript to load compile-time localization data. -To generate code that will load your localization data into the localization -system you need to have your localization data in JSON format that follows the -format: +This reads localization data at compile-time in a flat JSON-formatted +dictionary. The keys are message IDs, and the values are the translated +strings. For example: { - "aliases": { - "BEST_WISHES": "ax32f", - "MAY_YOUR_FORGE_BURN_BRIGHT": "by984", - ... - }, - "localizations": { - "elfish-woodland": { - "ax32f": "Merin sa haryalye alasse", - ... - }, - "dwarfish-north": { - "by984": "tan menu selek lanun khun", - ... - }, - ... - } + "BEST_WISHES": "Merin sa haryalye alasse" } -For "aliases": - - The key is the alias used to associate the use-case with the entry it - should use. - - The value is the translation id used to identify the text in the locale. - -For "localizations": - - The key is the locale code. - - The value is a map of localization id to localized text. - -For all values in "localizations": - - The key should match a value in "aliases". - - The value should be the localized text. - -An input and an output are needed. If files are not provided for input and/or -output, std-in and std-out will be used. - -Examples: - Read from std-in and write to std-out: - generate-locales.py - Read from input file and write to std: - generate-locales.py --source my-localizations.json - Read from input file and write to output file: - generate-locales.py --source my-localizations.json --output my_localizations.js +Each locale's translations are read from a separate file. For example, the path +the Arabic data would be ui/locales/ar.json. """ -from __future__ import print_function - import argparse -import codecs import contextlib import json -import string +import os import sys - -_TAB_CHARACTER = ' ' - - -def UsesConstantSyntax(value): - """Check if |value| follows our style for JavaScript constants.""" - allowed_characters = set(string.ascii_uppercase + string.digits + '_') - - # This uses set difference to find any characters in |value| that don't appear - # in |allowed_characters|. Then it uses boolean logic to return True for an - # empty set. - return not set(value) - allowed_characters - - -def VerifyInputData(data): - """Verifies all the localizations and IDs line-up. - - Returns: - A list of (warning_id, args) where warning_id is a string identifier and - args is a list of arguments for the warning. - """ - alias_mapping = data['aliases'] - localizations = data['localizations'] - - # Look for all the ids that are used across all locales. We will needs this - # to ensure that we have at least one alias defined for each one. - all_translation_ids = set() - for entries in localizations.values(): - all_translation_ids.update(entries.keys()) - - # Get the human readable aliases for each id. - aliases = set(alias_mapping.keys()) - - warnings = [] - - # Check if the readable name for each id is JS-Constant compatible. - for alias in aliases: - if not UsesConstantSyntax(alias): - warnings.append(('bad-alias', (alias,))) - - # Make sure that each translation id has an alias defined. - aliases_ids = set(alias_mapping.values()) - for translation_id in all_translation_ids: - if translation_id not in aliases_ids: - warnings.append(('missing-alias', (translation_id,))) - - # Check if any locales are missing entries found in other locales. - for locale, entries in localizations.items(): - for translation_id in all_translation_ids: - if translation_id not in entries: - warnings.append(('missing-localization', (locale, translation_id))) - - return warnings +import shakaBuildHelpers + + +_INDENTATION = ' ' + +# These are Google's "Tier 1" languages as of April 2019. +DEFAULT_LOCALES = [ + 'ar', + 'de', + 'en', + 'en-GB', + 'es', + 'es-419', + 'fr', + 'it', + 'ja', + 'ko', + 'nl', + 'pl', + 'pt', + 'ru', + 'th', + 'tr', + 'zh', + 'zh-TW', +] class Doc(object): @@ -158,11 +92,11 @@ def Code(self, block): for line in lines: # Right-strip the line to avoid trailing white space. We do this on the # full string so that tabbing will be removed if a blank line was added. - new_line = (_TAB_CHARACTER * self._tab_level) + line + new_line = (_INDENTATION * self._tab_level) + line self._lines.append(new_line.rstrip()) - def __str__(self): - return '\n'.join(self._lines) + def ToString(self): + return '\n'.join(self._lines) + '\n' def AsQuotedString(input_string): @@ -182,14 +116,13 @@ def AsQuotedString(input_string): return "'%s'" % output_string -def GenerateLocales(alias_mapping, localizations, class_name): +def GenerateLocalizations(localizations, class_name): """Generates JavaScript code to insert the localization data. This creates a function called "apply" in the class called |class_name| that, when called, will insert the data from |localizations|. Args: - id_mappings: A map of string tag to a string JavaScript constant name. localizations: A map of string locale name to a map of string tag to the string localization. class_name: A string name of the class to put generated code into. @@ -199,37 +132,27 @@ def GenerateLocales(alias_mapping, localizations, class_name): """ doc = Doc() - doc.Code("""/** - * @license - * Copyright 2016 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -""") - doc.Code(""" // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // This file is auto-generated. DO NOT EDIT THIS FILE. If you need to: -// - change which locales are in this file, update "build/locales.json" -// - change an entry for a specific locale, update "build/locales.json" -// - change anything else, update "build/generate-locales.py". +// - change which locales are in this file, use the --locales option in +// "build/all.py" or "build/build.py" +// - change an entry for a specific locale, update "ui/locales/" +// - change anything else, update "build/generateLocalizations.py". // -// To regenerate this file, run "build/generate-locales.py". +// To regenerate this file, run "build/generateLocalizations.py". // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! """) + # Insert a comment that the build scripts will read to determine the freshness + # of this output. This will be compared against a list of locales in the + # current build to decide if the output needs to be regenerated. + # DO NOT change the formatting here without also updating the "compiler.py" + # module and the "GenerateLocalizations" class's "_locales_changed" method. + locale_list_string = ', '.join(sorted(localizations.keys())) + doc.Code('// LOCALES: %s' % locale_list_string) + doc.Code("goog.provide('%s');" % class_name) - doc.Code("goog.provide('%s.Ids');" % class_name) doc.Code("goog.require('shaka.ui.Localization');") doc.Code(""" @@ -241,11 +164,12 @@ def GenerateLocales(alias_mapping, localizations, class_name): * each insert). * * @param {!shaka.ui.Localization} localization - */ -""") + */""") doc.Code('%s.apply = function(localization) {' % class_name) + message_ids = set() + # Go through the locales in sorted order so that we will be consistent between # runs. for locale in sorted(localizations.keys()): @@ -259,6 +183,7 @@ def GenerateLocales(alias_mapping, localizations, class_name): # Make sure that we sort by the localization keys so that they will # always be in the same order. for key, value in sorted(localization.items()): + message_ids.add(key) quoted_key = AsQuotedString(key) quoted_value = AsQuotedString(value) doc.Code('[%s, %s],' % (quoted_key, quoted_value)) @@ -267,49 +192,51 @@ def GenerateLocales(alias_mapping, localizations, class_name): doc.Code('};') # Close the function. - # Convert the map to an array with the key and value reversed so - # that we can sort them based on the alias. - constants = [] - for alias, translation_id in alias_mapping.items(): - constants.append((alias, translation_id)) - constants.sort() - - for alias, translation_id in constants: - doc.Code('') # Make sure we have a blank line before each constant. - doc.Code('/** @const {string} */') - doc.Code('%s.Ids.%s = %s;' % (class_name, - alias, - AsQuotedString(translation_id))) - - doc.Code('') # Need blank line at the end of the file + doc.Code(""" +/** + * @enum {string} + * @const + */ +%s.Ids = {""" % class_name) + for message_id in message_ids: + doc.Code(' %s: %s,' % (message_id, AsQuotedString(message_id))) + doc.Code('};') - return doc + return doc.ToString() def CreateParser(): """Create the argument parser for this application.""" + base = shakaBuildHelpers.get_source_base() + parser = argparse.ArgumentParser( description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) + parser.add_argument( + '--locales', + type=str, + nargs='+', + default=DEFAULT_LOCALES, + help='The list of locales to compile in (default %(default)r)') + parser.add_argument( '--source', - dest='source', type=str, - help='The file path for JSON input. (default: std in).') + default=os.path.join(base, 'ui', 'locales'), + help='The folder path for JSON inputs') parser.add_argument( '--output', - dest='output', type=str, - help='The file path for JavaScript output (default: std out).') + default=os.path.join(base, 'dist', 'locales.js'), + help='The file path for JavaScript output') parser.add_argument( '--class-name', - dest='class_name', type=str, - help='The fully qualified class name for the JavaScript output', - default='shaka.ui.Locales') + default='shaka.ui.Locales', + help='The fully qualified class name for the JavaScript output') return parser @@ -318,24 +245,17 @@ def main(args): parser = CreateParser() args = parser.parse_args(args) - if args.source: - with open(args.source, 'r') as f: - blob = json.load(f) - else: - if sys.stdin.isatty(): - sys.stderr.write('Reading input JSON from stdin...\n') - blob = json.load(sys.stdin) - - for warning_id, warning_args in VerifyInputData(blob): - sys.stderr.write('WARNING: %s %s\n' % (warning_id, warning_args)) + combined_localizations = {} + for locale in args.locales: + path = os.path.join(args.source, locale + '.json') + with open(path, 'rb') as f: + combined_localizations[locale] = json.load(f) - doc = GenerateLocales(blob['aliases'], blob['localizations'], args.class_name) + doc = GenerateLocalizations(combined_localizations, args.class_name) + with open(args.output, 'wb') as f: + f.write(doc.encode('utf-8')) - if args.output: - with codecs.open(args.output, 'w', 'utf-8') as f: - f.write(unicode(doc)) - else: - sys.stdout.write(unicode(doc)) + return args.output if __name__ == '__main__': diff --git a/build/locales.json b/build/locales.json deleted file mode 100644 index ada07d4e73..0000000000 --- a/build/locales.json +++ /dev/null @@ -1,579 +0,0 @@ -{ - "aliases":{ - "ARIA_LABEL_BACK":"1077325112364709655", - "ARIA_LABEL_CAPTIONS":"1911090580951495029", - "ARIA_LABEL_CAST":"7071612439610534706", - "ARIA_LABEL_EXIT_FULL_SCREEN":"6161306839322897077", - "ARIA_LABEL_FAST_FORWARD":"1774834209035716827", - "ARIA_LABEL_FULL_SCREEN":"8345190086337560158", - "ARIA_LABEL_LANGUAGE":"3278592358864783064", - "ARIA_LABEL_LIVE":"3045980486001972586", - "ARIA_LABEL_MORE_SETTINGS":"4388316720828367903", - "ARIA_LABEL_MUTE":"5963689277976480680", - "ARIA_LABEL_PAUSE":"9042260521669277115", - "ARIA_LABEL_ENTER_PICTURE_IN_PICTURE": "4242938254936928940", - "ARIA_LABEL_EXIT_PICTURE_IN_PICTURE": "6614181658619787283", - "ARIA_LABEL_PLAY":"836055097473758014", - "ARIA_LABEL_RESOLUTION":"6073266792045231479", - "ARIA_LABEL_REWIND":"1142734805932039923", - "ARIA_LABEL_SEEK":"5553522235935533682", - "ARIA_LABEL_UNMUTE":"2023925063728908356", - "ARIA_LABEL_VOLUME":"1050953507607739202", - "LABEL_AUTO_QUALITY":"4259064532355692191", - "LABEL_CAPTIONS":"1911090580951495029", - "LABEL_CAPTIONS_OFF":"8145129506114534451", - "LABEL_CAST":"7071612439610534706", - "LABEL_LANGUAGE":"3278592358864783064", - "LABEL_LIVE":"3045980486001972586", - "LABEL_MULTIPLE_LANGUAGES":"411375375680850814", - "LABEL_NOT_APPLICABLE":"5146287486336231188", - "LABEL_NOT_CASTING":"8145129506114534451", - "LABEL_PICTURE_IN_PICTURE":"622115170869907732", - "LABEL_PICTURE_IN_PICTURE_ON":"142853231704504146", - "LABEL_PICTURE_IN_PICTURE_OFF":"8145129506114534451", - "LABEL_RESOLUTION":"6073266792045231479", - "LABEL_UNKNOWN_LANGUAGE":"298626259350585300" - }, - "localizations":{ - "ar":{ - "1077325112364709655":"رجوع", - "8345190086337560158":"ملء الشاشة", - "6161306839322897077":"إنهاء وضع ملء الشاشة", - "1774834209035716827":"تقديم سريع", - "3045980486001972586":"مباشر", - "5963689277976480680":"كتم الصوت", - "1911090580951495029":"الترجمة", - "9042260521669277115":"إيقاف مؤقت", - "4242938254936928940":"الدخول في وضع \"نافذة ضمن نافذة\"", - "6614181658619787283":"الخروج من وضع \"نافذة ضمن نافذة\"", - "836055097473758014":"تشغيل", - "1142734805932039923":"إرجاع", - "4388316720828367903":"إعدادات إضافية", - "6073266792045231479":"", - "5553522235935533682":"شريط تمرير البحث", - "7071612439610534706":"إرسال...", - "2023925063728908356":"إلغاء كتم الصوت", - "1050953507607739202":"الحجم", - "4259064532355692191":"تلقائي", - "8145129506114534451":"إيقاف", - "3278592358864783064":"اللغة", - "622115170869907732":"نافذة ضمن النافذة", - "142853231704504146":"تشغيل", - "298626259350585300":"غير معروفة", - "5146287486336231188":"غير سارٍ" - }, - "de":{ - "1077325112364709655":"Zurück", - "8345190086337560158":"Vollbild", - "6161306839322897077":"Vollbildmodus beenden", - "1774834209035716827":"Vorspulen", - "3045980486001972586":"Live", - "5963689277976480680":"Stummschalten", - "1911090580951495029":"Untertitel", - "9042260521669277115":"Pausieren", - "4242938254936928940":"Bild-im-Bild-Modus aktivieren", - "6614181658619787283":"Bild-im-Bild-Modus beenden", - "836055097473758014":"Wiedergeben", - "1142734805932039923":"Zurückspulen", - "4388316720828367903":"Weitere Einstellungen", - "6073266792045231479":"Auflösung", - "5553522235935533682":"Schieberegler für Suche", - "7071612439610534706":"Streamen…", - "2023925063728908356":"Stummschaltung aufheben", - "1050953507607739202":"Lautstärke", - "4259064532355692191":"Automatisch", - "8145129506114534451":"Aus", - "3278592358864783064":"Sprache", - "622115170869907732":"Bild-in-Bild", - "142853231704504146":"An", - "298626259350585300":"Unbekannt", - "5146287486336231188":"Nicht zutreffend" - }, - "en-GB":{ - "1077325112364709655":"Back", - "8345190086337560158":"Full screen", - "6161306839322897077":"Exit full screen", - "1774834209035716827":"Fast-forward", - "3045980486001972586":"Live", - "5963689277976480680":"Mute", - "1911090580951495029":"Captions", - "9042260521669277115":"Pause", - "4242938254936928940":"enter picture-in-picture", - "6614181658619787283":"exit picture-in-picture", - "836055097473758014":"Play", - "1142734805932039923":"Rewind", - "4388316720828367903":"More settings", - "6073266792045231479":"Resolution", - "5553522235935533682":"Seek slider", - "7071612439610534706":"Cast...", - "2023925063728908356":"Unmute", - "1050953507607739202":"volume", - "4259064532355692191":"Auto", - "8145129506114534451":"Off", - "3278592358864783064":"Language", - "622115170869907732":"Picture in Picture", - "142853231704504146":"on", - "298626259350585300":"Unknown", - "5146287486336231188":"Not applicable" - }, - "en":{ - "1077325112364709655":"Back", - "8345190086337560158":"Full screen", - "6161306839322897077":"Exit full screen", - "1774834209035716827":"Fast-forward", - "3045980486001972586":"Live", - "5963689277976480680":"Mute", - "1911090580951495029":"Captions", - "9042260521669277115":"Pause", - "4242938254936928940":"enter picture-in-picture", - "6614181658619787283":"exit picture-in-picture", - "836055097473758014":"Play", - "1142734805932039923":"Rewind", - "4388316720828367903":"More settings", - "6073266792045231479":"Resolution", - "5553522235935533682":"Seek slider", - "7071612439610534706":"Cast...", - "2023925063728908356":"Unmute", - "1050953507607739202":"volume", - "4259064532355692191":"Auto", - "8145129506114534451":"Off", - "3278592358864783064":"Language", - "622115170869907732":"Picture in Picture", - "142853231704504146":"on", - "298626259350585300":"Unknown", - "5146287486336231188":"Not applicable" - }, - "es":{ - "1077325112364709655":"Atrás", - "8345190086337560158":"Pantalla completa", - "6161306839322897077":"Salir del modo de pantalla completa", - "1774834209035716827":"Avance rápido", - "3045980486001972586":"En directo", - "5963689277976480680":"Silenciar", - "1911090580951495029":"Subtítulos", - "9042260521669277115":"Pausa", - "4242938254936928940":"abrir el modo imagen en imagen", - "6614181658619787283":"salir del modo imagen en imagen", - "836055097473758014":"Reproducir", - "1142734805932039923":"Retroceder", - "4388316720828367903":"Más ajustes", - "6073266792045231479":"Resolución", - "5553522235935533682":"Barra deslizante de búsqueda", - "7071612439610534706":"Reparto...", - "2023925063728908356":"Activar sonido", - "1050953507607739202":"volumen", - "4259064532355692191":"Automática", - "8145129506114534451":"No", - "3278592358864783064":"Idioma", - "622115170869907732":"Imagen en imagen", - "142853231704504146":"activado", - "298626259350585300":"Desconocido", - "5146287486336231188":"No aplicable" - }, - "es-419":{ - "1077325112364709655":"Atrás", - "8345190086337560158":"Pantalla completa", - "6161306839322897077":"Salir de pantalla completa", - "1774834209035716827":"Avance rápido", - "3045980486001972586":"En vivo", - "5963689277976480680":"Silenciar", - "1911090580951495029":"Subtítulos", - "9042260521669277115":"Detener", - "4242938254936928940":"ingresar al modo de pantalla en pantalla", - "6614181658619787283":"salir del modo de pantalla en pantalla", - "836055097473758014":"Jugar", - "1142734805932039923":"Retroceder", - "4388316720828367903":"Más opciones de configuración", - "6073266792045231479":"Resolución", - "5553522235935533682":"Barra deslizante de búsqueda", - "7071612439610534706":"Transmitir…", - "2023925063728908356":"Activar sonido", - "1050953507607739202":"volumen", - "4259064532355692191":"Auto", - "8145129506114534451":"Desactivado", - "3278592358864783064":"Idioma", - "622115170869907732":"Pantalla en pantalla", - "142853231704504146":"activado", - "298626259350585300":"Desconocido", - "5146287486336231188":"No aplicable" - }, - "fr":{ - "1077325112364709655":"Retour", - "8345190086337560158":"Plein écran", - "6161306839322897077":"Quitter le mode plein écran", - "1774834209035716827":"Avance rapide", - "3045980486001972586":"En direct", - "5963689277976480680":"Désactiver le son", - "1911090580951495029":"Sous-titres", - "9042260521669277115":"Mettre en veille", - "4242938254936928940":"utiliser le mode PIP", - "6614181658619787283":"quitter le mode PIP", - "836055097473758014":"Lire", - "1142734805932039923":"Retour arrière", - "4388316720828367903":"Autres paramètres", - "6073266792045231479":"Résolution", - "5553522235935533682":"Barre de recherche", - "7071612439610534706":"Caster sur…", - "2023925063728908356":"Activer le son", - "1050953507607739202":"volume", - "4259064532355692191":"Auto", - "8145129506114534451":"Désactivée", - "3278592358864783064":"Langue", - "622115170869907732":"Picture-in-picture", - "142853231704504146":"activé", - "298626259350585300":"Inconnue", - "5146287486336231188":"Non applicable" - }, - "it":{ - "1077325112364709655":"Indietro", - "8345190086337560158":"Schermo intero", - "6161306839322897077":"Esci dalla modalità a schermo intero", - "1774834209035716827":"Avanti veloce", - "3045980486001972586":"Dal vivo", - "5963689277976480680":"Disattiva audio", - "1911090580951495029":"Sottotitoli", - "9042260521669277115":"Metti in pausa", - "4242938254936928940":"attiva picture in picture", - "6614181658619787283":"esci da picture in picture", - "836055097473758014":"Riproduci", - "1142734805932039923":"Riavvolgi", - "4388316720828367903":"Altre impostazioni", - "6073266792045231479":"Risoluzione", - "5553522235935533682":"Dispositivo di scorrimento", - "7071612439610534706":"Trasmetti…", - "2023925063728908356":"Riattiva audio", - "1050953507607739202":"volume", - "4259064532355692191":"Auto", - "8145129506114534451":"Disattivato", - "3278592358864783064":"Lingua", - "622115170869907732":"Picture in picture", - "142853231704504146":"on", - "298626259350585300":"Sconosciuto", - "5146287486336231188":"Non applicable" - }, - "ja":{ - "1077325112364709655":"戻る", - "8345190086337560158":"全画面", - "6161306839322897077":"全画面モードの終了", - "1774834209035716827":"早送り", - "3045980486001972586":"ライブ", - "5963689277976480680":"ミュート", - "1911090580951495029":"字幕", - "9042260521669277115":"一時停止", - "4242938254936928940":"ピクチャー イン ピクチャーを開始します", - "6614181658619787283":"ピクチャー イン ピクチャーを終了します", - "836055097473758014":"再生", - "1142734805932039923":"巻き戻し", - "4388316720828367903":"その他の設定", - "6073266792045231479":"解像度", - "5553522235935533682":"シーク バー", - "7071612439610534706":"キャスト...", - "2023925063728908356":"ミュート解除", - "1050953507607739202":"音量", - "4259064532355692191":"自動", - "8145129506114534451":"オフ", - "3278592358864783064":"言語", - "622115170869907732":"ピクチャー イン ピクチャー", - "142853231704504146":"オン", - "298626259350585300":"不明", - "5146287486336231188":"--" - }, - "ko":{ - "1077325112364709655":"뒤로", - "8345190086337560158":"전체화면", - "6161306839322897077":"전체화면 종료", - "1774834209035716827":"빨리감기", - "3045980486001972586":"라이브", - "5963689277976480680":"음소거", - "1911090580951495029":"자막", - "9042260521669277115":"일시중지", - "4242938254936928940":"PIP 모드 시작", - "6614181658619787283":"PIP 모드 종료", - "836055097473758014":"재생", - "1142734805932039923":"되감기", - "4388316720828367903":"설정 더보기", - "6073266792045231479":"해상도", - "5553522235935533682":"탐색 슬라이더", - "7071612439610534706":"전송...", - "2023925063728908356":"음소거 해제", - "1050953507607739202":"볼륨", - "4259064532355692191":"자동", - "8145129506114534451":"사용 안함", - "3278592358864783064":"언어", - "622115170869907732":"PIP 모드", - "142853231704504146":"사용", - "298626259350585300":"알 수 없음", - "5146287486336231188":"해당 사항 없음" - }, - "nl":{ - "1077325112364709655":"Terug", - "8345190086337560158":"Volledig scherm", - "6161306839322897077":"Volledig scherm afsluiten", - "1774834209035716827":"Vooruitspoelen", - "3045980486001972586":"Live", - "5963689277976480680":"Dempen", - "1911090580951495029":"Ondertiteling", - "9042260521669277115":"Onderbreken", - "4242938254936928940":"scherm-in-scherm openen", - "6614181658619787283":"scherm-in-scherm afsluiten", - "836055097473758014":"Afspelen", - "1142734805932039923":"Terugspoelen", - "4388316720828367903":"Meer instellingen", - "6073266792045231479":"Resolutie", - "5553522235935533682":"Zoekschuifbalk", - "7071612439610534706":"Casten...", - "2023925063728908356":"Dempen opheffen", - "1050953507607739202":"volume", - "4259064532355692191":"Automatisch", - "8145129506114534451":"Uit", - "3278592358864783064":"Taal", - "622115170869907732":"Scherm-in-scherm", - "142853231704504146":"aan", - "298626259350585300":"Onbekend", - "5146287486336231188":"Niet van toepassing" - }, - "pl":{ - "1077325112364709655":"Wstecz", - "8345190086337560158":"Pełny ekran", - "6161306839322897077":"Zamknij pełny ekran", - "1774834209035716827":"Przewiń do przodu", - "3045980486001972586":"Na żywo", - "5963689277976480680":"Wycisz", - "1911090580951495029":"Napisy", - "9042260521669277115":"Wstrzymaj", - "4242938254936928940":"włącz tryb obrazu w obrazie", - "6614181658619787283":"wyłącz tryb obrazu w obrazie", - "836055097473758014":"Odtwarzaj", - "1142734805932039923":"Przewiń do tyłu", - "4388316720828367903":"Więcej ustawień", - "6073266792045231479":"Rozdzielczość", - "5553522235935533682":"Suwak przewijania", - "7071612439610534706":"Prześlij...", - "2023925063728908356":"Wyłącz wyciszenie", - "1050953507607739202":"głośność", - "4259064532355692191":"Automatyczna", - "8145129506114534451":"Wyłączone", - "3278592358864783064":"Język", - "622115170869907732":"Obraz w obrazie", - "142853231704504146":"wł.", - "298626259350585300":"Nieznane", - "5146287486336231188":"Nie dotyczy" - }, - "pt-BR":{ - "1077325112364709655":"Voltar", - "8345190086337560158":"Tela inteira", - "6161306839322897077":"Sair da tela inteira", - "1774834209035716827":"Avançar", - "3045980486001972586":"Ao vivo", - "5963689277976480680":"Desativar som", - "1911090580951495029":"Legendas ocultas", - "9042260521669277115":"Pausar", - "4242938254936928940":"entrar no modo picture-in-picture", - "6614181658619787283":"sair de picture-in-picture", - "836055097473758014":"Reproduzir", - "1142734805932039923":"Retroceder", - "4388316720828367903":"Mais configurações", - "6073266792045231479":"Resolução", - "5553522235935533682":"Botão deslizante de busca", - "7071612439610534706":"Elenco...", - "2023925063728908356":"Ativar som", - "1050953507607739202":"volume", - "4259064532355692191":"Automático", - "8145129506114534451":"Desativado", - "3278592358864783064":"Idioma", - "622115170869907732":"Picture-in-picture", - "142853231704504146":"ativado", - "298626259350585300":"Desconhecido", - "5146287486336231188":"Não aplicável" - }, - "pt-PT":{ - "1077325112364709655":"Anterior", - "8345190086337560158":"Ecrã inteiro", - "6161306839322897077":"Sair do ecrã inteiro", - "1774834209035716827":"Avançar", - "3045980486001972586":"Em direto", - "5963689277976480680":"Desativar o som", - "1911090580951495029":"Legendas", - "9042260521669277115":"Colocar em pausa", - "4242938254936928940":"entrar no modo ecrã no ecrã", - "6614181658619787283":"sair do modo ecrã no ecrã", - "836055097473758014":"Reproduzir", - "1142734805932039923":"Recuar", - "4388316720828367903":"Mais definições", - "6073266792045231479":"Resolução", - "5553522235935533682":"Controlo de deslize da procura", - "7071612439610534706":"Transmitir...", - "2023925063728908356":"Reativar o som", - "1050953507607739202":"volume", - "4259064532355692191":"Automático", - "8145129506114534451":"Desativado", - "3278592358864783064":"Idioma", - "622115170869907732":"Ecrã no ecrã", - "142853231704504146":"ativado", - "298626259350585300":"Desconhecida", - "5146287486336231188":"Não aplicável" - }, - "ru":{ - "1077325112364709655":"Назад", - "8345190086337560158":"Во весь экран", - "6161306839322897077":"Выход из полноэкранного режима", - "1774834209035716827":"Перемотать вперед", - "3045980486001972586":"В эфире", - "5963689277976480680":"Отключить звук", - "1911090580951495029":"Субтитры", - "9042260521669277115":"Приостановить", - "4242938254936928940":"включить режим \"Картинка в картинке\"", - "6614181658619787283":"выйти из режима \"Картинка в картинке\"", - "836055097473758014":"Смотреть", - "1142734805932039923":"Перемотать назад", - "4388316720828367903":"Дополнительные настройки", - "6073266792045231479":"Разрешение", - "5553522235935533682":"Ползунок поиска", - "7071612439610534706":"Хромкаст", - "2023925063728908356":"Включить звук", - "1050953507607739202":"громкость", - "4259064532355692191":"Автонастройка", - "8145129506114534451":"Выкл.", - "3278592358864783064":"Язык", - "622115170869907732":"Картинка в картинке", - "142853231704504146":"ВКЛ", - "298626259350585300":"Неизвестно", - "5146287486336231188":"Неприменимо" - }, - "th":{ - "1077325112364709655":"กลับ", - "8345190086337560158":"เต็มหน้าจอ", - "6161306839322897077":"ออกจากโหมดเต็มหน้าจอ", - "1774834209035716827":"กรอไปข้างหน้า", - "3045980486001972586":"สด", - "5963689277976480680":"ปิดเสียง", - "1911090580951495029":"คำอธิบายวิดีโอ", - "9042260521669277115":"หยุดชั่วคราว", - "4242938254936928940":"เข้าสู่การแสดงภาพซ้อนภาพ", - "6614181658619787283":"ออกจากการแสดงภาพซ้อนภาพ", - "836055097473758014":"เล่น", - "1142734805932039923":"กรอกลับ", - "4388316720828367903":"การตั้งค่าเพิ่มเติม", - "6073266792045231479":"ความละเอียด", - "5553522235935533682":"แถบเลื่อนค้นหา", - "7071612439610534706":"แคสต์...", - "2023925063728908356":"เปิดเสียง", - "1050953507607739202":"ระดับเสียง", - "4259064532355692191":"อัตโนมัติ", - "8145129506114534451":"ปิด", - "3278592358864783064":"ภาษา", - "622115170869907732":"การแสดงภาพซ้อนภาพ", - "142853231704504146":"เปิด", - "298626259350585300":"ไม่ทราบ", - "5146287486336231188":"ไม่เกี่ยวข้อง" - }, - "tr":{ - "1077325112364709655":"Geri", - "8345190086337560158":"Tam ekran", - "6161306839322897077":"Tam ekrandan çık", - "1774834209035716827":"İleri sar", - "3045980486001972586":"Canlı", - "5963689277976480680":"Sesi kapat", - "1911090580951495029":"Altyazılar", - "9042260521669277115":"Duraklat", - "4242938254936928940":"pencere içinde pencere moduna gir", - "6614181658619787283":"pencere içinde pencere modundan çıkın", - "836055097473758014":"Oynat", - "1142734805932039923":"Geri sar", - "4388316720828367903":"Diğer ayarlar", - "6073266792045231479":"Çözünürlük", - "5553522235935533682":"Arama kaydırma çubuğu", - "7071612439610534706":"Yayınla...", - "2023925063728908356":"Sesi aç", - "1050953507607739202":"ses düzeyi", - "4259064532355692191":"Otomatik", - "8145129506114534451":"Kapalı", - "3278592358864783064":"Dil", - "622115170869907732":"Pencere içinde Pencere", - "142853231704504146":"açık", - "298626259350585300":"Bilinmiyor", - "5146287486336231188":"Kullanılmıyor" - }, - "zh-HK":{ - "1077325112364709655":"返回", - "8345190086337560158":"全螢幕", - "6161306839322897077":"結束全螢幕", - "1774834209035716827":"快轉", - "3045980486001972586":"直播", - "5963689277976480680":"靜音", - "1911090580951495029":"字幕", - "9042260521669277115":"暫停", - "4242938254936928940":"進入畫中畫", - "6614181658619787283":"退出畫中畫", - "836055097473758014":"播放", - "1142734805932039923":"倒帶", - "4388316720828367903":"更多設定", - "6073266792045231479":"", - "5553522235935533682":"搜尋滑桿", - "7071612439610534706":"投放…", - "2023925063728908356":"解除靜音", - "1050953507607739202":"音量", - "4259064532355692191":"自動", - "8145129506114534451":"未選取", - "3278592358864783064":"語言", - "622115170869907732":"畫中畫", - "142853231704504146":"", - "298626259350585300":"不明", - "5146287486336231188":"不適用" - }, - "zh-CN":{ - "1077325112364709655":"返回", - "8345190086337560158":"全屏", - "6161306839322897077":"退出全屏", - "1774834209035716827":"快进", - "3045980486001972586":"直播", - "5963689277976480680":"静音", - "1911090580951495029":"字幕", - "9042260521669277115":"暂停", - "4242938254936928940":"进入“画中画”模式", - "6614181658619787283":"退出“画中画”模式", - "836055097473758014":"播放", - "1142734805932039923":"快退", - "4388316720828367903":"更多设置", - "6073266792045231479":"分辨率", - "5553522235935533682":"播放滑块", - "7071612439610534706":"投射…", - "2023925063728908356":"取消静音", - "1050953507607739202":"音量", - "4259064532355692191":"自动", - "8145129506114534451":"关闭", - "3278592358864783064":"语言", - "622115170869907732":"画中画", - "142853231704504146":"开启", - "298626259350585300":"未知", - "5146287486336231188":"不適用" - }, - "zh-TW":{ - "1077325112364709655":"返回", - "8345190086337560158":"全螢幕", - "6161306839322897077":"結束全螢幕", - "1774834209035716827":"快轉", - "3045980486001972586":"直播", - "5963689277976480680":"靜音", - "1911090580951495029":"字幕", - "9042260521669277115":"暫停", - "4242938254936928940":"進入子母畫面", - "6614181658619787283":"離開子母畫面", - "836055097473758014":"播放", - "1142734805932039923":"倒轉", - "4388316720828367903":"更多設定", - "6073266792045231479":"解析度", - "5553522235935533682":"搜尋滑桿", - "7071612439610534706":"投放…", - "2023925063728908356":"解除靜音", - "1050953507607739202":"音量", - "4259064532355692191":"自動", - "8145129506114534451":"關閉", - "3278592358864783064":"語言", - "622115170869907732":"子母畫面", - "142853231704504146":"開啟", - "298626259350585300":"未知", - "5146287486336231188":"不適用" - } - } -} diff --git a/build/types/ui b/build/types/ui index f11ff91577..69f1300dbb 100644 --- a/build/types/ui +++ b/build/types/ui @@ -12,7 +12,6 @@ +../../ui/fullscreen_button.js +../../ui/language_utils.js +../../ui/localization.js -+../../ui/locales.js +../../ui/mute_button.js +../../ui/overflow_menu.js +../../ui/pip_button.js diff --git a/karma.conf.js b/karma.conf.js index edaf6e16e7..75ed643c09 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -114,6 +114,7 @@ module.exports = function(config) { {pattern: 'third_party/language-mapping-list/**/*.js', included: false}, {pattern: 'test/test/assets/*', included: false}, {pattern: 'dist/shaka-player.ui.js', included: false}, + {pattern: 'dist/locales.js', included: false}, {pattern: 'node_modules/**/*.js', included: false}, ], diff --git a/ui/audio_language_selection.js b/ui/audio_language_selection.js index 081ef7fa0f..2bed2495a3 100644 --- a/ui/audio_language_selection.js +++ b/ui/audio_language_selection.js @@ -188,13 +188,13 @@ shaka.ui.AudioLanguageSelection = class extends shaka.ui.Element { const LocIds = shaka.ui.Locales.Ids; this.backFromLanguageButton_.setAttribute(shaka.ui.Constants.ARIA_LABEL, - this.localization.resolve(LocIds.ARIA_LABEL_BACK)); + this.localization.resolve(LocIds.BACK)); this.languagesButton_.setAttribute(shaka.ui.Constants.ARIA_LABEL, - this.localization.resolve(LocIds.ARIA_LABEL_LANGUAGE)); + this.localization.resolve(LocIds.LANGUAGE)); this.languageNameSpan_.textContent = - this.localization.resolve(LocIds.LABEL_LANGUAGE); + this.localization.resolve(LocIds.LANGUAGE); this.backFromLanguageSpan_.textContent = - this.localization.resolve(LocIds.LABEL_LANGUAGE); + this.localization.resolve(LocIds.LANGUAGE); } }; diff --git a/ui/cast_button.js b/ui/cast_button.js index fb58edb6a1..d9f291986b 100644 --- a/ui/cast_button.js +++ b/ui/cast_button.js @@ -147,7 +147,7 @@ shaka.ui.CastButton = class extends shaka.ui.Element { this.castProxy_.receiverName(); } else { this.castCurrentSelectionSpan_.textContent = - this.localization.resolve(shaka.ui.Locales.Ids.LABEL_NOT_CASTING); + this.localization.resolve(shaka.ui.Locales.Ids.OFF); } } @@ -159,9 +159,9 @@ shaka.ui.CastButton = class extends shaka.ui.Element { const LocIds = shaka.ui.Locales.Ids; this.castButton_.setAttribute(shaka.ui.Constants.ARIA_LABEL, - this.localization.resolve(LocIds.ARIA_LABEL_CAST)); + this.localization.resolve(LocIds.CAST)); this.castNameSpan_.textContent = - this.localization.resolve(LocIds.LABEL_CAST); + this.localization.resolve(LocIds.CAST); // If we're not casting, string "not casting" will be displayed, // which needs localization. diff --git a/ui/controls.js b/ui/controls.js index 2ae8d9b43b..873dad9b03 100644 --- a/ui/controls.js +++ b/ui/controls.js @@ -448,13 +448,12 @@ shaka.ui.Controls.prototype.updateLocalizedStrings_ = function() { if (this.seekBar_) { this.seekBar_.setAttribute(shaka.ui.Constants.ARIA_LABEL, - this.localization_.resolve(LocIds.ARIA_LABEL_SEEK)); + this.localization_.resolve(LocIds.SEEK)); } // Localize state-dependant labels const makePlayNotPause = this.video_.paused && !this.isSeeking_; - const playButtonAriaLabelId = makePlayNotPause ? LocIds.ARIA_LABEL_PLAY : - LocIds.ARIA_LABEL_PAUSE; + const playButtonAriaLabelId = makePlayNotPause ? LocIds.PLAY : LocIds.PAUSE; this.playButton_.setAttribute(shaka.ui.Constants.ARIA_LABEL, this.localization_.resolve(playButtonAriaLabelId)); }; @@ -893,11 +892,11 @@ shaka.ui.Controls.prototype.onPlayStateChange_ = function() { if (this.enabled_ && this.video_.paused && !this.isSeeking_) { this.playButton_.setAttribute('icon', 'play'); this.playButton_.setAttribute(shaka.ui.Constants.ARIA_LABEL, - this.localization_.resolve(shaka.ui.Locales.Ids.ARIA_LABEL_PLAY)); + this.localization_.resolve(shaka.ui.Locales.Ids.PLAY)); } else { this.playButton_.setAttribute('icon', 'pause'); this.playButton_.setAttribute(shaka.ui.Constants.ARIA_LABEL, - this.localization_.resolve(shaka.ui.Locales.Ids.ARIA_LABEL_PAUSE)); + this.localization_.resolve(shaka.ui.Locales.Ids.PAUSE)); } }; diff --git a/ui/fast_forward_button.js b/ui/fast_forward_button.js index 7c84412d2b..bd7cefd314 100644 --- a/ui/fast_forward_button.js +++ b/ui/fast_forward_button.js @@ -65,8 +65,7 @@ shaka.ui.FastForwardButton = class extends shaka.ui.Element { */ updateAriaLabel_() { this.button_.setAttribute(shaka.ui.Constants.ARIA_LABEL, - this.localization.resolve( - shaka.ui.Locales.Ids.ARIA_LABEL_FAST_FORWARD)); + this.localization.resolve(shaka.ui.Locales.Ids.FAST_FORWARD)); } /** diff --git a/ui/fullscreen_button.js b/ui/fullscreen_button.js index 252cad775b..4fe82ddbc3 100644 --- a/ui/fullscreen_button.js +++ b/ui/fullscreen_button.js @@ -80,8 +80,7 @@ shaka.ui.FullscreenButton = class extends shaka.ui.Element { updateAriaLabel_() { const LocIds = shaka.ui.Locales.Ids; const label = document.fullscreenElement ? - LocIds.ARIA_LABEL_EXIT_FULL_SCREEN : - LocIds.ARIA_LABEL_FULL_SCREEN; + LocIds.EXIT_FULL_SCREEN : LocIds.FULL_SCREEN; this.button_.setAttribute(shaka.ui.Constants.ARIA_LABEL, this.localization.resolve(label)); diff --git a/ui/language_utils.js b/ui/language_utils.js index efb2cb82bb..09178bfcb6 100644 --- a/ui/language_utils.js +++ b/ui/language_utils.js @@ -114,9 +114,11 @@ shaka.ui.LanguageUtils = class { // are used to indicate something that isn't one specific language. switch (locale) { case 'mul': - return resolve(shaka.ui.Locales.Ids.LABEL_MULTIPLE_LANGUAGES); + return resolve(shaka.ui.Locales.Ids.MULTIPLE_LANGUAGES); + case 'und': + return resolve(shaka.ui.Locales.Ids.UNDETERMINED_LANGUAGE); case 'zxx': - return resolve(shaka.ui.Locales.Ids.LABEL_NOT_APPLICABLE); + return resolve(shaka.ui.Locales.Ids.NOT_APPLICABLE); } // Extract the base language from the locale as a fallback step. @@ -134,7 +136,7 @@ shaka.ui.LanguageUtils = class { return mozilla.LanguageMapping[language].nativeName + ' (' + locale + ')'; } else { - return resolve(shaka.ui.Locales.Ids.LABEL_UNKNOWN_LANGUAGE) + + return resolve(shaka.ui.Locales.Ids.UNRECOGNIZED_LANGUAGE) + ' (' + locale + ')'; } } diff --git a/ui/locales.js b/ui/locales.js deleted file mode 100644 index b7a35b514a..0000000000 --- a/ui/locales.js +++ /dev/null @@ -1,683 +0,0 @@ -/** - * @license - * Copyright 2016 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -// This file is auto-generated. DO NOT EDIT THIS FILE. If you need to: -// - change which locales are in this file, update "build/locales.json" -// - change an entry for a specific locale, update "build/locales.json" -// - change anything else, update "build/generate-locales.py". -// -// To regenerate this file, run "build/generate-locales.py". -// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -goog.provide('shaka.ui.Locales'); -goog.provide('shaka.ui.Locales.Ids'); -goog.require('shaka.ui.Localization'); - -/** - * Insert all localization data for the UI into |localization|. This should be - * done BEFORE any listeners are added to the localization system (to avoid - * callbacks for each insert) and should be done BEFORE changing to the initial - * preferred locale (reduces the work needed to update the internal state after - * each insert). - * - * @param {!shaka.ui.Localization} localization - */ - -shaka.ui.Locales.apply = function(localization) { - localization.insert('ar', new Map([ - ['1050953507607739202', 'الحجم'], - ['1077325112364709655', 'رجوع'], - ['1142734805932039923', 'إرجاع'], - ['142853231704504146', 'تشغيل'], - ['1774834209035716827', 'تقديم سريع'], - ['1911090580951495029', 'الترجمة'], - ['2023925063728908356', 'إلغاء كتم الصوت'], - ['298626259350585300', 'غير معروفة'], - ['3045980486001972586', 'مباشر'], - ['3278592358864783064', 'اللغة'], - ['4242938254936928940', 'الدخول في وضع "نافذة ضمن نافذة"'], - ['4259064532355692191', 'تلقائي'], - ['4388316720828367903', 'إعدادات إضافية'], - ['5146287486336231188', 'غير سارٍ'], - ['5553522235935533682', 'شريط تمرير البحث'], - ['5963689277976480680', 'كتم الصوت'], - ['6073266792045231479', ''], - ['6161306839322897077', 'إنهاء وضع ملء الشاشة'], - ['622115170869907732', 'نافذة ضمن النافذة'], - ['6614181658619787283', 'الخروج من وضع "نافذة ضمن نافذة"'], - ['7071612439610534706', 'إرسال...'], - ['8145129506114534451', 'إيقاف'], - ['8345190086337560158', 'ملء الشاشة'], - ['836055097473758014', 'تشغيل'], - ['9042260521669277115', 'إيقاف مؤقت'], - ])); - localization.insert('de', new Map([ - ['1050953507607739202', 'Lautstärke'], - ['1077325112364709655', 'Zurück'], - ['1142734805932039923', 'Zurückspulen'], - ['142853231704504146', 'An'], - ['1774834209035716827', 'Vorspulen'], - ['1911090580951495029', 'Untertitel'], - ['2023925063728908356', 'Stummschaltung aufheben'], - ['298626259350585300', 'Unbekannt'], - ['3045980486001972586', 'Live'], - ['3278592358864783064', 'Sprache'], - ['4242938254936928940', 'Bild-im-Bild-Modus aktivieren'], - ['4259064532355692191', 'Automatisch'], - ['4388316720828367903', 'Weitere Einstellungen'], - ['5146287486336231188', 'Nicht zutreffend'], - ['5553522235935533682', 'Schieberegler für Suche'], - ['5963689277976480680', 'Stummschalten'], - ['6073266792045231479', 'Auflösung'], - ['6161306839322897077', 'Vollbildmodus beenden'], - ['622115170869907732', 'Bild-in-Bild'], - ['6614181658619787283', 'Bild-im-Bild-Modus beenden'], - ['7071612439610534706', 'Streamen…'], - ['8145129506114534451', 'Aus'], - ['8345190086337560158', 'Vollbild'], - ['836055097473758014', 'Wiedergeben'], - ['9042260521669277115', 'Pausieren'], - ])); - localization.insert('en', new Map([ - ['1050953507607739202', 'volume'], - ['1077325112364709655', 'Back'], - ['1142734805932039923', 'Rewind'], - ['142853231704504146', 'on'], - ['1774834209035716827', 'Fast-forward'], - ['1911090580951495029', 'Captions'], - ['2023925063728908356', 'Unmute'], - ['298626259350585300', 'Unknown'], - ['3045980486001972586', 'Live'], - ['3278592358864783064', 'Language'], - ['4242938254936928940', 'enter picture-in-picture'], - ['4259064532355692191', 'Auto'], - ['4388316720828367903', 'More settings'], - ['5146287486336231188', 'Not applicable'], - ['5553522235935533682', 'Seek slider'], - ['5963689277976480680', 'Mute'], - ['6073266792045231479', 'Resolution'], - ['6161306839322897077', 'Exit full screen'], - ['622115170869907732', 'Picture in Picture'], - ['6614181658619787283', 'exit picture-in-picture'], - ['7071612439610534706', 'Cast...'], - ['8145129506114534451', 'Off'], - ['8345190086337560158', 'Full screen'], - ['836055097473758014', 'Play'], - ['9042260521669277115', 'Pause'], - ])); - localization.insert('en-GB', new Map([ - ['1050953507607739202', 'volume'], - ['1077325112364709655', 'Back'], - ['1142734805932039923', 'Rewind'], - ['142853231704504146', 'on'], - ['1774834209035716827', 'Fast-forward'], - ['1911090580951495029', 'Captions'], - ['2023925063728908356', 'Unmute'], - ['298626259350585300', 'Unknown'], - ['3045980486001972586', 'Live'], - ['3278592358864783064', 'Language'], - ['4242938254936928940', 'enter picture-in-picture'], - ['4259064532355692191', 'Auto'], - ['4388316720828367903', 'More settings'], - ['5146287486336231188', 'Not applicable'], - ['5553522235935533682', 'Seek slider'], - ['5963689277976480680', 'Mute'], - ['6073266792045231479', 'Resolution'], - ['6161306839322897077', 'Exit full screen'], - ['622115170869907732', 'Picture in Picture'], - ['6614181658619787283', 'exit picture-in-picture'], - ['7071612439610534706', 'Cast...'], - ['8145129506114534451', 'Off'], - ['8345190086337560158', 'Full screen'], - ['836055097473758014', 'Play'], - ['9042260521669277115', 'Pause'], - ])); - localization.insert('es', new Map([ - ['1050953507607739202', 'volumen'], - ['1077325112364709655', 'Atrás'], - ['1142734805932039923', 'Retroceder'], - ['142853231704504146', 'activado'], - ['1774834209035716827', 'Avance rápido'], - ['1911090580951495029', 'Subtítulos'], - ['2023925063728908356', 'Activar sonido'], - ['298626259350585300', 'Desconocido'], - ['3045980486001972586', 'En directo'], - ['3278592358864783064', 'Idioma'], - ['4242938254936928940', 'abrir el modo imagen en imagen'], - ['4259064532355692191', 'Automática'], - ['4388316720828367903', 'Más ajustes'], - ['5146287486336231188', 'No aplicable'], - ['5553522235935533682', 'Barra deslizante de búsqueda'], - ['5963689277976480680', 'Silenciar'], - ['6073266792045231479', 'Resolución'], - ['6161306839322897077', 'Salir del modo de pantalla completa'], - ['622115170869907732', 'Imagen en imagen'], - ['6614181658619787283', 'salir del modo imagen en imagen'], - ['7071612439610534706', 'Reparto...'], - ['8145129506114534451', 'No'], - ['8345190086337560158', 'Pantalla completa'], - ['836055097473758014', 'Reproducir'], - ['9042260521669277115', 'Pausa'], - ])); - localization.insert('es-419', new Map([ - ['1050953507607739202', 'volumen'], - ['1077325112364709655', 'Atrás'], - ['1142734805932039923', 'Retroceder'], - ['142853231704504146', 'activado'], - ['1774834209035716827', 'Avance rápido'], - ['1911090580951495029', 'Subtítulos'], - ['2023925063728908356', 'Activar sonido'], - ['298626259350585300', 'Desconocido'], - ['3045980486001972586', 'En vivo'], - ['3278592358864783064', 'Idioma'], - ['4242938254936928940', 'ingresar al modo de pantalla en pantalla'], - ['4259064532355692191', 'Auto'], - ['4388316720828367903', 'Más opciones de configuración'], - ['5146287486336231188', 'No aplicable'], - ['5553522235935533682', 'Barra deslizante de búsqueda'], - ['5963689277976480680', 'Silenciar'], - ['6073266792045231479', 'Resolución'], - ['6161306839322897077', 'Salir de pantalla completa'], - ['622115170869907732', 'Pantalla en pantalla'], - ['6614181658619787283', 'salir del modo de pantalla en pantalla'], - ['7071612439610534706', 'Transmitir…'], - ['8145129506114534451', 'Desactivado'], - ['8345190086337560158', 'Pantalla completa'], - ['836055097473758014', 'Jugar'], - ['9042260521669277115', 'Detener'], - ])); - localization.insert('fr', new Map([ - ['1050953507607739202', 'volume'], - ['1077325112364709655', 'Retour'], - ['1142734805932039923', 'Retour arrière'], - ['142853231704504146', 'activé'], - ['1774834209035716827', 'Avance rapide'], - ['1911090580951495029', 'Sous-titres'], - ['2023925063728908356', 'Activer le son'], - ['298626259350585300', 'Inconnue'], - ['3045980486001972586', 'En direct'], - ['3278592358864783064', 'Langue'], - ['4242938254936928940', 'utiliser le mode PIP'], - ['4259064532355692191', 'Auto'], - ['4388316720828367903', 'Autres paramètres'], - ['5146287486336231188', 'Non applicable'], - ['5553522235935533682', 'Barre de recherche'], - ['5963689277976480680', 'Désactiver le son'], - ['6073266792045231479', 'Résolution'], - ['6161306839322897077', 'Quitter le mode plein écran'], - ['622115170869907732', 'Picture-in-picture'], - ['6614181658619787283', 'quitter le mode PIP'], - ['7071612439610534706', 'Caster sur…'], - ['8145129506114534451', 'Désactivée'], - ['8345190086337560158', 'Plein écran'], - ['836055097473758014', 'Lire'], - ['9042260521669277115', 'Mettre en veille'], - ])); - localization.insert('it', new Map([ - ['1050953507607739202', 'volume'], - ['1077325112364709655', 'Indietro'], - ['1142734805932039923', 'Riavvolgi'], - ['142853231704504146', 'on'], - ['1774834209035716827', 'Avanti veloce'], - ['1911090580951495029', 'Sottotitoli'], - ['2023925063728908356', 'Riattiva audio'], - ['298626259350585300', 'Sconosciuto'], - ['3045980486001972586', 'Dal vivo'], - ['3278592358864783064', 'Lingua'], - ['4242938254936928940', 'attiva picture in picture'], - ['4259064532355692191', 'Auto'], - ['4388316720828367903', 'Altre impostazioni'], - ['5146287486336231188', 'Non applicable'], - ['5553522235935533682', 'Dispositivo di scorrimento'], - ['5963689277976480680', 'Disattiva audio'], - ['6073266792045231479', 'Risoluzione'], - ['6161306839322897077', 'Esci dalla modalità a schermo intero'], - ['622115170869907732', 'Picture in picture'], - ['6614181658619787283', 'esci da picture in picture'], - ['7071612439610534706', 'Trasmetti…'], - ['8145129506114534451', 'Disattivato'], - ['8345190086337560158', 'Schermo intero'], - ['836055097473758014', 'Riproduci'], - ['9042260521669277115', 'Metti in pausa'], - ])); - localization.insert('ja', new Map([ - ['1050953507607739202', '音量'], - ['1077325112364709655', '戻る'], - ['1142734805932039923', '巻き戻し'], - ['142853231704504146', 'オン'], - ['1774834209035716827', '早送り'], - ['1911090580951495029', '字幕'], - ['2023925063728908356', 'ミュート解除'], - ['298626259350585300', '不明'], - ['3045980486001972586', 'ライブ'], - ['3278592358864783064', '言語'], - ['4242938254936928940', 'ピクチャー イン ピクチャーを開始します'], - ['4259064532355692191', '自動'], - ['4388316720828367903', 'その他の設定'], - ['5146287486336231188', '--'], - ['5553522235935533682', 'シーク バー'], - ['5963689277976480680', 'ミュート'], - ['6073266792045231479', '解像度'], - ['6161306839322897077', '全画面モードの終了'], - ['622115170869907732', 'ピクチャー イン ピクチャー'], - ['6614181658619787283', 'ピクチャー イン ピクチャーを終了します'], - ['7071612439610534706', 'キャスト...'], - ['8145129506114534451', 'オフ'], - ['8345190086337560158', '全画面'], - ['836055097473758014', '再生'], - ['9042260521669277115', '一時停止'], - ])); - localization.insert('ko', new Map([ - ['1050953507607739202', '볼륨'], - ['1077325112364709655', '뒤로'], - ['1142734805932039923', '되감기'], - ['142853231704504146', '사용'], - ['1774834209035716827', '빨리감기'], - ['1911090580951495029', '자막'], - ['2023925063728908356', '음소거 해제'], - ['298626259350585300', '알 수 없음'], - ['3045980486001972586', '라이브'], - ['3278592358864783064', '언어'], - ['4242938254936928940', 'PIP 모드 시작'], - ['4259064532355692191', '자동'], - ['4388316720828367903', '설정 더보기'], - ['5146287486336231188', '해당 사항 없음'], - ['5553522235935533682', '탐색 슬라이더'], - ['5963689277976480680', '음소거'], - ['6073266792045231479', '해상도'], - ['6161306839322897077', '전체화면 종료'], - ['622115170869907732', 'PIP 모드'], - ['6614181658619787283', 'PIP 모드 종료'], - ['7071612439610534706', '전송...'], - ['8145129506114534451', '사용 안함'], - ['8345190086337560158', '전체화면'], - ['836055097473758014', '재생'], - ['9042260521669277115', '일시중지'], - ])); - localization.insert('nl', new Map([ - ['1050953507607739202', 'volume'], - ['1077325112364709655', 'Terug'], - ['1142734805932039923', 'Terugspoelen'], - ['142853231704504146', 'aan'], - ['1774834209035716827', 'Vooruitspoelen'], - ['1911090580951495029', 'Ondertiteling'], - ['2023925063728908356', 'Dempen opheffen'], - ['298626259350585300', 'Onbekend'], - ['3045980486001972586', 'Live'], - ['3278592358864783064', 'Taal'], - ['4242938254936928940', 'scherm-in-scherm openen'], - ['4259064532355692191', 'Automatisch'], - ['4388316720828367903', 'Meer instellingen'], - ['5146287486336231188', 'Niet van toepassing'], - ['5553522235935533682', 'Zoekschuifbalk'], - ['5963689277976480680', 'Dempen'], - ['6073266792045231479', 'Resolutie'], - ['6161306839322897077', 'Volledig scherm afsluiten'], - ['622115170869907732', 'Scherm-in-scherm'], - ['6614181658619787283', 'scherm-in-scherm afsluiten'], - ['7071612439610534706', 'Casten...'], - ['8145129506114534451', 'Uit'], - ['8345190086337560158', 'Volledig scherm'], - ['836055097473758014', 'Afspelen'], - ['9042260521669277115', 'Onderbreken'], - ])); - localization.insert('pl', new Map([ - ['1050953507607739202', 'głośność'], - ['1077325112364709655', 'Wstecz'], - ['1142734805932039923', 'Przewiń do tyłu'], - ['142853231704504146', 'wł.'], - ['1774834209035716827', 'Przewiń do przodu'], - ['1911090580951495029', 'Napisy'], - ['2023925063728908356', 'Wyłącz wyciszenie'], - ['298626259350585300', 'Nieznane'], - ['3045980486001972586', 'Na żywo'], - ['3278592358864783064', 'Język'], - ['4242938254936928940', 'włącz tryb obrazu w obrazie'], - ['4259064532355692191', 'Automatyczna'], - ['4388316720828367903', 'Więcej ustawień'], - ['5146287486336231188', 'Nie dotyczy'], - ['5553522235935533682', 'Suwak przewijania'], - ['5963689277976480680', 'Wycisz'], - ['6073266792045231479', 'Rozdzielczość'], - ['6161306839322897077', 'Zamknij pełny ekran'], - ['622115170869907732', 'Obraz w obrazie'], - ['6614181658619787283', 'wyłącz tryb obrazu w obrazie'], - ['7071612439610534706', 'Prześlij...'], - ['8145129506114534451', 'Wyłączone'], - ['8345190086337560158', 'Pełny ekran'], - ['836055097473758014', 'Odtwarzaj'], - ['9042260521669277115', 'Wstrzymaj'], - ])); - localization.insert('pt-BR', new Map([ - ['1050953507607739202', 'volume'], - ['1077325112364709655', 'Voltar'], - ['1142734805932039923', 'Retroceder'], - ['142853231704504146', 'ativado'], - ['1774834209035716827', 'Avançar'], - ['1911090580951495029', 'Legendas ocultas'], - ['2023925063728908356', 'Ativar som'], - ['298626259350585300', 'Desconhecido'], - ['3045980486001972586', 'Ao vivo'], - ['3278592358864783064', 'Idioma'], - ['4242938254936928940', 'entrar no modo picture-in-picture'], - ['4259064532355692191', 'Automático'], - ['4388316720828367903', 'Mais configurações'], - ['5146287486336231188', 'Não aplicável'], - ['5553522235935533682', 'Botão deslizante de busca'], - ['5963689277976480680', 'Desativar som'], - ['6073266792045231479', 'Resolução'], - ['6161306839322897077', 'Sair da tela inteira'], - ['622115170869907732', 'Picture-in-picture'], - ['6614181658619787283', 'sair de picture-in-picture'], - ['7071612439610534706', 'Elenco...'], - ['8145129506114534451', 'Desativado'], - ['8345190086337560158', 'Tela inteira'], - ['836055097473758014', 'Reproduzir'], - ['9042260521669277115', 'Pausar'], - ])); - localization.insert('pt-PT', new Map([ - ['1050953507607739202', 'volume'], - ['1077325112364709655', 'Anterior'], - ['1142734805932039923', 'Recuar'], - ['142853231704504146', 'ativado'], - ['1774834209035716827', 'Avançar'], - ['1911090580951495029', 'Legendas'], - ['2023925063728908356', 'Reativar o som'], - ['298626259350585300', 'Desconhecida'], - ['3045980486001972586', 'Em direto'], - ['3278592358864783064', 'Idioma'], - ['4242938254936928940', 'entrar no modo ecrã no ecrã'], - ['4259064532355692191', 'Automático'], - ['4388316720828367903', 'Mais definições'], - ['5146287486336231188', 'Não aplicável'], - ['5553522235935533682', 'Controlo de deslize da procura'], - ['5963689277976480680', 'Desativar o som'], - ['6073266792045231479', 'Resolução'], - ['6161306839322897077', 'Sair do ecrã inteiro'], - ['622115170869907732', 'Ecrã no ecrã'], - ['6614181658619787283', 'sair do modo ecrã no ecrã'], - ['7071612439610534706', 'Transmitir...'], - ['8145129506114534451', 'Desativado'], - ['8345190086337560158', 'Ecrã inteiro'], - ['836055097473758014', 'Reproduzir'], - ['9042260521669277115', 'Colocar em pausa'], - ])); - localization.insert('ru', new Map([ - ['1050953507607739202', 'громкость'], - ['1077325112364709655', 'Назад'], - ['1142734805932039923', 'Перемотать назад'], - ['142853231704504146', 'ВКЛ'], - ['1774834209035716827', 'Перемотать вперед'], - ['1911090580951495029', 'Субтитры'], - ['2023925063728908356', 'Включить звук'], - ['298626259350585300', 'Неизвестно'], - ['3045980486001972586', 'В эфире'], - ['3278592358864783064', 'Язык'], - ['4242938254936928940', 'включить режим "Картинка в картинке"'], - ['4259064532355692191', 'Автонастройка'], - ['4388316720828367903', 'Дополнительные настройки'], - ['5146287486336231188', 'Неприменимо'], - ['5553522235935533682', 'Ползунок поиска'], - ['5963689277976480680', 'Отключить звук'], - ['6073266792045231479', 'Разрешение'], - ['6161306839322897077', 'Выход из полноэкранного режима'], - ['622115170869907732', 'Картинка в картинке'], - ['6614181658619787283', 'выйти из режима "Картинка в картинке"'], - ['7071612439610534706', 'Хромкаст'], - ['8145129506114534451', 'Выкл.'], - ['8345190086337560158', 'Во весь экран'], - ['836055097473758014', 'Смотреть'], - ['9042260521669277115', 'Приостановить'], - ])); - localization.insert('th', new Map([ - ['1050953507607739202', 'ระดับเสียง'], - ['1077325112364709655', 'กลับ'], - ['1142734805932039923', 'กรอกลับ'], - ['142853231704504146', 'เปิด'], - ['1774834209035716827', 'กรอไปข้างหน้า'], - ['1911090580951495029', 'คำอธิบายวิดีโอ'], - ['2023925063728908356', 'เปิดเสียง'], - ['298626259350585300', 'ไม่ทราบ'], - ['3045980486001972586', 'สด'], - ['3278592358864783064', 'ภาษา'], - ['4242938254936928940', 'เข้าสู่การแสดงภาพซ้อนภาพ'], - ['4259064532355692191', 'อัตโนมัติ'], - ['4388316720828367903', 'การตั้งค่าเพิ่มเติม'], - ['5146287486336231188', 'ไม่เกี่ยวข้อง'], - ['5553522235935533682', 'แถบเลื่อนค้นหา'], - ['5963689277976480680', 'ปิดเสียง'], - ['6073266792045231479', 'ความละเอียด'], - ['6161306839322897077', 'ออกจากโหมดเต็มหน้าจอ'], - ['622115170869907732', 'การแสดงภาพซ้อนภาพ'], - ['6614181658619787283', 'ออกจากการแสดงภาพซ้อนภาพ'], - ['7071612439610534706', 'แคสต์...'], - ['8145129506114534451', 'ปิด'], - ['8345190086337560158', 'เต็มหน้าจอ'], - ['836055097473758014', 'เล่น'], - ['9042260521669277115', 'หยุดชั่วคราว'], - ])); - localization.insert('tr', new Map([ - ['1050953507607739202', 'ses düzeyi'], - ['1077325112364709655', 'Geri'], - ['1142734805932039923', 'Geri sar'], - ['142853231704504146', 'açık'], - ['1774834209035716827', 'İleri sar'], - ['1911090580951495029', 'Altyazılar'], - ['2023925063728908356', 'Sesi aç'], - ['298626259350585300', 'Bilinmiyor'], - ['3045980486001972586', 'Canlı'], - ['3278592358864783064', 'Dil'], - ['4242938254936928940', 'pencere içinde pencere moduna gir'], - ['4259064532355692191', 'Otomatik'], - ['4388316720828367903', 'Diğer ayarlar'], - ['5146287486336231188', 'Kullanılmıyor'], - ['5553522235935533682', 'Arama kaydırma çubuğu'], - ['5963689277976480680', 'Sesi kapat'], - ['6073266792045231479', 'Çözünürlük'], - ['6161306839322897077', 'Tam ekrandan çık'], - ['622115170869907732', 'Pencere içinde Pencere'], - ['6614181658619787283', 'pencere içinde pencere modundan çıkın'], - ['7071612439610534706', 'Yayınla...'], - ['8145129506114534451', 'Kapalı'], - ['8345190086337560158', 'Tam ekran'], - ['836055097473758014', 'Oynat'], - ['9042260521669277115', 'Duraklat'], - ])); - localization.insert('zh-CN', new Map([ - ['1050953507607739202', '音量'], - ['1077325112364709655', '返回'], - ['1142734805932039923', '快退'], - ['142853231704504146', '开启'], - ['1774834209035716827', '快进'], - ['1911090580951495029', '字幕'], - ['2023925063728908356', '取消静音'], - ['298626259350585300', '未知'], - ['3045980486001972586', '直播'], - ['3278592358864783064', '语言'], - ['4242938254936928940', '进入“画中画”模式'], - ['4259064532355692191', '自动'], - ['4388316720828367903', '更多设置'], - ['5146287486336231188', '不適用'], - ['5553522235935533682', '播放滑块'], - ['5963689277976480680', '静音'], - ['6073266792045231479', '分辨率'], - ['6161306839322897077', '退出全屏'], - ['622115170869907732', '画中画'], - ['6614181658619787283', '退出“画中画”模式'], - ['7071612439610534706', '投射…'], - ['8145129506114534451', '关闭'], - ['8345190086337560158', '全屏'], - ['836055097473758014', '播放'], - ['9042260521669277115', '暂停'], - ])); - localization.insert('zh-HK', new Map([ - ['1050953507607739202', '音量'], - ['1077325112364709655', '返回'], - ['1142734805932039923', '倒帶'], - ['142853231704504146', ''], - ['1774834209035716827', '快轉'], - ['1911090580951495029', '字幕'], - ['2023925063728908356', '解除靜音'], - ['298626259350585300', '不明'], - ['3045980486001972586', '直播'], - ['3278592358864783064', '語言'], - ['4242938254936928940', '進入畫中畫'], - ['4259064532355692191', '自動'], - ['4388316720828367903', '更多設定'], - ['5146287486336231188', '不適用'], - ['5553522235935533682', '搜尋滑桿'], - ['5963689277976480680', '靜音'], - ['6073266792045231479', ''], - ['6161306839322897077', '結束全螢幕'], - ['622115170869907732', '畫中畫'], - ['6614181658619787283', '退出畫中畫'], - ['7071612439610534706', '投放…'], - ['8145129506114534451', '未選取'], - ['8345190086337560158', '全螢幕'], - ['836055097473758014', '播放'], - ['9042260521669277115', '暫停'], - ])); - localization.insert('zh-TW', new Map([ - ['1050953507607739202', '音量'], - ['1077325112364709655', '返回'], - ['1142734805932039923', '倒轉'], - ['142853231704504146', '開啟'], - ['1774834209035716827', '快轉'], - ['1911090580951495029', '字幕'], - ['2023925063728908356', '解除靜音'], - ['298626259350585300', '未知'], - ['3045980486001972586', '直播'], - ['3278592358864783064', '語言'], - ['4242938254936928940', '進入子母畫面'], - ['4259064532355692191', '自動'], - ['4388316720828367903', '更多設定'], - ['5146287486336231188', '不適用'], - ['5553522235935533682', '搜尋滑桿'], - ['5963689277976480680', '靜音'], - ['6073266792045231479', '解析度'], - ['6161306839322897077', '結束全螢幕'], - ['622115170869907732', '子母畫面'], - ['6614181658619787283', '離開子母畫面'], - ['7071612439610534706', '投放…'], - ['8145129506114534451', '關閉'], - ['8345190086337560158', '全螢幕'], - ['836055097473758014', '播放'], - ['9042260521669277115', '暫停'], - ])); -}; - -/** @const {string} */ -shaka.ui.Locales.Ids.ARIA_LABEL_BACK = '1077325112364709655'; - -/** @const {string} */ -shaka.ui.Locales.Ids.ARIA_LABEL_CAPTIONS = '1911090580951495029'; - -/** @const {string} */ -shaka.ui.Locales.Ids.ARIA_LABEL_CAST = '7071612439610534706'; - -/** @const {string} */ -shaka.ui.Locales.Ids.ARIA_LABEL_ENTER_PICTURE_IN_PICTURE = - '4242938254936928940'; - -/** @const {string} */ -shaka.ui.Locales.Ids.ARIA_LABEL_EXIT_FULL_SCREEN = '6161306839322897077'; - -/** @const {string} */ -shaka.ui.Locales.Ids.ARIA_LABEL_EXIT_PICTURE_IN_PICTURE = '6614181658619787283'; - -/** @const {string} */ -shaka.ui.Locales.Ids.ARIA_LABEL_FAST_FORWARD = '1774834209035716827'; - -/** @const {string} */ -shaka.ui.Locales.Ids.ARIA_LABEL_FULL_SCREEN = '8345190086337560158'; - -/** @const {string} */ -shaka.ui.Locales.Ids.ARIA_LABEL_LANGUAGE = '3278592358864783064'; - -/** @const {string} */ -shaka.ui.Locales.Ids.ARIA_LABEL_LIVE = '3045980486001972586'; - -/** @const {string} */ -shaka.ui.Locales.Ids.ARIA_LABEL_MORE_SETTINGS = '4388316720828367903'; - -/** @const {string} */ -shaka.ui.Locales.Ids.ARIA_LABEL_MUTE = '5963689277976480680'; - -/** @const {string} */ -shaka.ui.Locales.Ids.ARIA_LABEL_PAUSE = '9042260521669277115'; - -/** @const {string} */ -shaka.ui.Locales.Ids.ARIA_LABEL_PLAY = '836055097473758014'; - -/** @const {string} */ -shaka.ui.Locales.Ids.ARIA_LABEL_RESOLUTION = '6073266792045231479'; - -/** @const {string} */ -shaka.ui.Locales.Ids.ARIA_LABEL_REWIND = '1142734805932039923'; - -/** @const {string} */ -shaka.ui.Locales.Ids.ARIA_LABEL_SEEK = '5553522235935533682'; - -/** @const {string} */ -shaka.ui.Locales.Ids.ARIA_LABEL_UNMUTE = '2023925063728908356'; - -/** @const {string} */ -shaka.ui.Locales.Ids.ARIA_LABEL_VOLUME = '1050953507607739202'; - -/** @const {string} */ -shaka.ui.Locales.Ids.LABEL_AUTO_QUALITY = '4259064532355692191'; - -/** @const {string} */ -shaka.ui.Locales.Ids.LABEL_CAPTIONS = '1911090580951495029'; - -/** @const {string} */ -shaka.ui.Locales.Ids.LABEL_CAPTIONS_OFF = '8145129506114534451'; - -/** @const {string} */ -shaka.ui.Locales.Ids.LABEL_CAST = '7071612439610534706'; - -/** @const {string} */ -shaka.ui.Locales.Ids.LABEL_LANGUAGE = '3278592358864783064'; - -/** @const {string} */ -shaka.ui.Locales.Ids.LABEL_LIVE = '3045980486001972586'; - -/** @const {string} */ -shaka.ui.Locales.Ids.LABEL_MULTIPLE_LANGUAGES = '411375375680850814'; - -/** @const {string} */ -shaka.ui.Locales.Ids.LABEL_NOT_APPLICABLE = '5146287486336231188'; - -/** @const {string} */ -shaka.ui.Locales.Ids.LABEL_NOT_CASTING = '8145129506114534451'; - -/** @const {string} */ -shaka.ui.Locales.Ids.LABEL_PICTURE_IN_PICTURE = '622115170869907732'; - -/** @const {string} */ -shaka.ui.Locales.Ids.LABEL_PICTURE_IN_PICTURE_OFF = '8145129506114534451'; - -/** @const {string} */ -shaka.ui.Locales.Ids.LABEL_PICTURE_IN_PICTURE_ON = '142853231704504146'; - -/** @const {string} */ -shaka.ui.Locales.Ids.LABEL_RESOLUTION = '6073266792045231479'; - -/** @const {string} */ -shaka.ui.Locales.Ids.LABEL_UNKNOWN_LANGUAGE = '298626259350585300'; diff --git a/ui/locales/ar.json b/ui/locales/ar.json new file mode 100644 index 0000000000..fe34541ae6 --- /dev/null +++ b/ui/locales/ar.json @@ -0,0 +1,29 @@ +{ + "FULL_SCREEN": "ملء الشاشة", + "EXIT_FULL_SCREEN": "إنهاء وضع ملء الشاشة", + "FAST_FORWARD": "تقديم سريع", + "REWIND": "إرجاع", + "MUTE": "كتم الصوت", + "UNMUTE": "إلغاء كتم الصوت", + "PAUSE": "إيقاف مؤقت", + "PLAY": "تشغيل", + "SEEK": "شريط تمرير البحث", + "VOLUME": "الحجم", + "SKIP_TO_LIVE": "مباشر", + "LIVE": "مباشر", + "MORE_SETTINGS": "إعدادات إضافية", + "BACK": "رجوع", + "CAPTIONS": "الترجمة", + "RESOLUTION": "", + "AUTO_QUALITY": "تلقائي", + "CAST": "إرسال...", + "LANGUAGE": "اللغة", + "UNRECOGNIZED_LANGUAGE": "غير معروفة", + "UNDETERMINED_LANGUAGE": "غير معروفة", + "NOT_APPLICABLE": "غير سارٍ", + "ENTER_PICTURE_IN_PICTURE": "الدخول في وضع \"نافذة ضمن نافذة\"", + "EXIT_PICTURE_IN_PICTURE": "الخروج من وضع \"نافذة ضمن نافذة\"", + "PICTURE_IN_PICTURE": "نافذة ضمن النافذة", + "ON": "تشغيل", + "OFF": "إيقاف" +} diff --git a/ui/locales/de.json b/ui/locales/de.json new file mode 100644 index 0000000000..f564057ca5 --- /dev/null +++ b/ui/locales/de.json @@ -0,0 +1,30 @@ +{ + "FULL_SCREEN": "Vollbild", + "EXIT_FULL_SCREEN": "Vollbildmodus beenden", + "FAST_FORWARD": "Vorspulen", + "REWIND": "Zurückspulen", + "MUTE": "Stummschalten", + "UNMUTE": "Stummschaltung aufheben", + "PAUSE": "Pausieren", + "PLAY": "Wiedergeben", + "SEEK": "Schieberegler für Suche", + "VOLUME": "Lautstärke", + "SKIP_TO_LIVE": "Live", + "LIVE": "Live", + "MORE_SETTINGS": "Weitere Einstellungen", + "BACK": "Zurück", + "CAPTIONS": "Untertitel", + "RESOLUTION": "Auflösung", + "AUTO_QUALITY": "Automatisch", + "CAST": "Streamen…", + "LANGUAGE": "Sprache", + "UNRECOGNIZED_LANGUAGE": "Unerkannt", + "UNDETERMINED_LANGUAGE": "Unbestimmt", + "MULTIPLE_LANGUAGES": "mehrere Sprachen", + "NOT_APPLICABLE": "Nicht zutreffend", + "ENTER_PICTURE_IN_PICTURE": "Bild-im-Bild-Modus aktivieren", + "EXIT_PICTURE_IN_PICTURE": "Bild-im-Bild-Modus beenden", + "PICTURE_IN_PICTURE": "Bild-in-Bild", + "ON": "An", + "OFF": "Aus" +} diff --git a/ui/locales/en-GB.json b/ui/locales/en-GB.json new file mode 100644 index 0000000000..d6f5ec0bdd --- /dev/null +++ b/ui/locales/en-GB.json @@ -0,0 +1,30 @@ +{ + "FULL_SCREEN": "Full screen", + "EXIT_FULL_SCREEN": "Exit full screen", + "FAST_FORWARD": "Fast-forward", + "REWIND": "Rewind", + "MUTE": "Mute", + "UNMUTE": "Unmute", + "PAUSE": "Pause", + "PLAY": "Play", + "SEEK": "Seek", + "VOLUME": "Volume", + "SKIP_TO_LIVE": "Skip ahead to live", + "LIVE": "Live", + "MORE_SETTINGS": "More settings", + "BACK": "Back", + "CAPTIONS": "Captions", + "RESOLUTION": "Resolution", + "AUTO_QUALITY": "Auto", + "CAST": "Cast...", + "LANGUAGE": "Language", + "UNRECOGNIZED_LANGUAGE": "Unrecognized", + "UNDETERMINED_LANGUAGE": "Undetermined", + "MULTIPLE_LANGUAGES": "Multiple languages", + "NOT_APPLICABLE": "Not applicable", + "ENTER_PICTURE_IN_PICTURE": "Enter Picture-in-Picture", + "EXIT_PICTURE_IN_PICTURE": "Exit Picture-in-Picture", + "PICTURE_IN_PICTURE": "Picture-in-Picture", + "ON": "On", + "OFF": "Off" +} diff --git a/ui/locales/en.json b/ui/locales/en.json new file mode 100644 index 0000000000..d6f5ec0bdd --- /dev/null +++ b/ui/locales/en.json @@ -0,0 +1,30 @@ +{ + "FULL_SCREEN": "Full screen", + "EXIT_FULL_SCREEN": "Exit full screen", + "FAST_FORWARD": "Fast-forward", + "REWIND": "Rewind", + "MUTE": "Mute", + "UNMUTE": "Unmute", + "PAUSE": "Pause", + "PLAY": "Play", + "SEEK": "Seek", + "VOLUME": "Volume", + "SKIP_TO_LIVE": "Skip ahead to live", + "LIVE": "Live", + "MORE_SETTINGS": "More settings", + "BACK": "Back", + "CAPTIONS": "Captions", + "RESOLUTION": "Resolution", + "AUTO_QUALITY": "Auto", + "CAST": "Cast...", + "LANGUAGE": "Language", + "UNRECOGNIZED_LANGUAGE": "Unrecognized", + "UNDETERMINED_LANGUAGE": "Undetermined", + "MULTIPLE_LANGUAGES": "Multiple languages", + "NOT_APPLICABLE": "Not applicable", + "ENTER_PICTURE_IN_PICTURE": "Enter Picture-in-Picture", + "EXIT_PICTURE_IN_PICTURE": "Exit Picture-in-Picture", + "PICTURE_IN_PICTURE": "Picture-in-Picture", + "ON": "On", + "OFF": "Off" +} diff --git a/ui/locales/es-419.json b/ui/locales/es-419.json new file mode 100644 index 0000000000..2928957092 --- /dev/null +++ b/ui/locales/es-419.json @@ -0,0 +1,29 @@ +{ + "FULL_SCREEN": "Pantalla completa", + "EXIT_FULL_SCREEN": "Salir de pantalla completa", + "FAST_FORWARD": "Avance rápido", + "REWIND": "Retroceder", + "MUTE": "Silenciar", + "UNMUTE": "Activar sonido", + "PAUSE": "Detener", + "PLAY": "Jugar", + "SEEK": "Barra deslizante de búsqueda", + "VOLUME": "volumen", + "SKIP_TO_LIVE": "En vivo", + "LIVE": "En vivo", + "MORE_SETTINGS": "Más opciones de configuración", + "BACK": "Atrás", + "CAPTIONS": "Subtítulos", + "RESOLUTION": "Resolución", + "AUTO_QUALITY": "Auto", + "CAST": "Transmitir…", + "LANGUAGE": "Idioma", + "UNRECOGNIZED_LANGUAGE": "Desconocido", + "UNDETERMINED_LANGUAGE": "Desconocido", + "NOT_APPLICABLE": "No aplicable", + "ENTER_PICTURE_IN_PICTURE": "ingresar al modo de pantalla en pantalla", + "EXIT_PICTURE_IN_PICTURE": "salir del modo de pantalla en pantalla", + "PICTURE_IN_PICTURE": "Pantalla en pantalla", + "ON": "activado", + "OFF": "Desactivado" +} diff --git a/ui/locales/es.json b/ui/locales/es.json new file mode 100644 index 0000000000..83afebbcb2 --- /dev/null +++ b/ui/locales/es.json @@ -0,0 +1,30 @@ +{ + "FULL_SCREEN": "Pantalla completa", + "EXIT_FULL_SCREEN": "Salir del modo de pantalla completa", + "FAST_FORWARD": "Avance rápido", + "REWIND": "Retroceder", + "MUTE": "Silenciar", + "UNMUTE": "Activar sonido", + "PAUSE": "Pausa", + "PLAY": "Reproducir", + "SEEK": "Barra deslizante de búsqueda", + "VOLUME": "volumen", + "SKIP_TO_LIVE": "En directo", + "LIVE": "En directo", + "MORE_SETTINGS": "Más ajustes", + "BACK": "Atrás", + "CAPTIONS": "Subtítulos", + "RESOLUTION": "Resolución", + "AUTO_QUALITY": "Automática", + "CAST": "Reparto...", + "LANGUAGE": "Idioma", + "UNRECOGNIZED_LANGUAGE": "Desconocido", + "UNDETERMINED_LANGUAGE": "Desconocido", + "MULTIPLE_LANGUAGES": "varios idiomas", + "NOT_APPLICABLE": "No aplicable", + "ENTER_PICTURE_IN_PICTURE": "abrir el modo imagen en imagen", + "EXIT_PICTURE_IN_PICTURE": "salir del modo imagen en imagen", + "PICTURE_IN_PICTURE": "Imagen en imagen", + "ON": "activado", + "OFF": "No" +} diff --git a/ui/locales/fr.json b/ui/locales/fr.json new file mode 100644 index 0000000000..a7c06a55a8 --- /dev/null +++ b/ui/locales/fr.json @@ -0,0 +1,30 @@ +{ + "FULL_SCREEN": "Plein écran", + "EXIT_FULL_SCREEN": "Quitter le mode plein écran", + "FAST_FORWARD": "Avance rapide", + "REWIND": "Retour arrière", + "MUTE": "Désactiver le son", + "UNMUTE": "Activer le son", + "PAUSE": "Mettre en veille", + "PLAY": "Lire", + "SEEK": "Barre de recherche", + "VOLUME": "volume", + "SKIP_TO_LIVE": "En direct", + "LIVE": "En direct", + "MORE_SETTINGS": "Autres paramètres", + "BACK": "Retour", + "CAPTIONS": "Sous-titres", + "RESOLUTION": "Résolution", + "AUTO_QUALITY": "Auto", + "CAST": "Caster sur…", + "LANGUAGE": "Langue", + "UNRECOGNIZED_LANGUAGE": "Inconnue", + "UNDETERMINED_LANGUAGE": "Inconnue", + "MULTIPLE_LANGUAGES": "plusieurs langues", + "NOT_APPLICABLE": "Non applicable", + "ENTER_PICTURE_IN_PICTURE": "utiliser le mode PIP", + "EXIT_PICTURE_IN_PICTURE": "quitter le mode PIP", + "PICTURE_IN_PICTURE": "Picture-in-picture", + "ON": "activé", + "OFF": "Désactivée" +} diff --git a/ui/locales/it.json b/ui/locales/it.json new file mode 100644 index 0000000000..5907fae615 --- /dev/null +++ b/ui/locales/it.json @@ -0,0 +1,29 @@ +{ + "FULL_SCREEN": "Schermo intero", + "EXIT_FULL_SCREEN": "Esci dalla modalità a schermo intero", + "FAST_FORWARD": "Avanti veloce", + "REWIND": "Riavvolgi", + "MUTE": "Disattiva audio", + "UNMUTE": "Riattiva audio", + "PAUSE": "Metti in pausa", + "PLAY": "Riproduci", + "SEEK": "Dispositivo di scorrimento", + "VOLUME": "volume", + "SKIP_TO_LIVE": "Dal vivo", + "LIVE": "Dal vivo", + "MORE_SETTINGS": "Altre impostazioni", + "BACK": "Indietro", + "CAPTIONS": "Sottotitoli", + "RESOLUTION": "Risoluzione", + "AUTO_QUALITY": "Auto", + "CAST": "Trasmetti…", + "LANGUAGE": "Lingua", + "UNRECOGNIZED_LANGUAGE": "Sconosciuto", + "UNDETERMINED_LANGUAGE": "Sconosciuto", + "NOT_APPLICABLE": "Non applicable", + "ENTER_PICTURE_IN_PICTURE": "attiva picture in picture", + "EXIT_PICTURE_IN_PICTURE": "esci da picture in picture", + "PICTURE_IN_PICTURE": "Picture in picture", + "ON": "on", + "OFF": "Disattivato" +} diff --git a/ui/locales/ja.json b/ui/locales/ja.json new file mode 100644 index 0000000000..3610019f7b --- /dev/null +++ b/ui/locales/ja.json @@ -0,0 +1,30 @@ +{ + "FULL_SCREEN": "全画面", + "EXIT_FULL_SCREEN": "全画面モードの終了", + "FAST_FORWARD": "早送り", + "REWIND": "巻き戻し", + "MUTE": "ミュート", + "UNMUTE": "ミュート解除", + "PAUSE": "一時停止", + "PLAY": "再生", + "SEEK": "シーク バー", + "VOLUME": "音量", + "SKIP_TO_LIVE": "ライブ", + "LIVE": "ライブ", + "MORE_SETTINGS": "その他の設定", + "BACK": "戻る", + "CAPTIONS": "字幕", + "RESOLUTION": "解像度", + "AUTO_QUALITY": "自動", + "CAST": "キャスト...", + "LANGUAGE": "言語", + "UNRECOGNIZED_LANGUAGE": "不明", + "UNDETERMINED_LANGUAGE": "不明", + "MULTIPLE_LANGUAGES": "複数の言語", + "NOT_APPLICABLE": "--", + "ENTER_PICTURE_IN_PICTURE": "ピクチャー イン ピクチャーを開始します", + "EXIT_PICTURE_IN_PICTURE": "ピクチャー イン ピクチャーを終了します", + "PICTURE_IN_PICTURE": "ピクチャー イン ピクチャー", + "ON": "オン", + "OFF": "オフ" +} diff --git a/ui/locales/ko.json b/ui/locales/ko.json new file mode 100644 index 0000000000..56268776db --- /dev/null +++ b/ui/locales/ko.json @@ -0,0 +1,30 @@ +{ + "FULL_SCREEN": "전체화면", + "EXIT_FULL_SCREEN": "전체화면 종료", + "FAST_FORWARD": "빨리감기", + "REWIND": "되감기", + "MUTE": "음소거", + "UNMUTE": "음소거 해제", + "PAUSE": "일시중지", + "PLAY": "재생", + "SEEK": "탐색 슬라이더", + "VOLUME": "볼륨", + "SKIP_TO_LIVE": "라이브", + "LIVE": "라이브", + "MORE_SETTINGS": "설정 더보기", + "BACK": "뒤로", + "CAPTIONS": "자막", + "RESOLUTION": "해상도", + "AUTO_QUALITY": "자동", + "CAST": "전송...", + "LANGUAGE": "언어", + "UNRECOGNIZED_LANGUAGE": "알 수 없음", + "UNDETERMINED_LANGUAGE": "알 수 없음", + "MULTIPLE_LANGUAGES": "여러 언어", + "NOT_APPLICABLE": "해당 사항 없음", + "ENTER_PICTURE_IN_PICTURE": "PIP 모드 시작", + "EXIT_PICTURE_IN_PICTURE": "PIP 모드 종료", + "PICTURE_IN_PICTURE": "PIP 모드", + "ON": "사용", + "OFF": "사용 안함" +} diff --git a/ui/locales/nl.json b/ui/locales/nl.json new file mode 100644 index 0000000000..da2f4c4e17 --- /dev/null +++ b/ui/locales/nl.json @@ -0,0 +1,29 @@ +{ + "FULL_SCREEN": "Volledig scherm", + "EXIT_FULL_SCREEN": "Volledig scherm afsluiten", + "FAST_FORWARD": "Vooruitspoelen", + "REWIND": "Terugspoelen", + "MUTE": "Dempen", + "UNMUTE": "Dempen opheffen", + "PAUSE": "Onderbreken", + "PLAY": "Afspelen", + "SEEK": "Zoekschuifbalk", + "VOLUME": "volume", + "SKIP_TO_LIVE": "Live", + "LIVE": "Live", + "MORE_SETTINGS": "Meer instellingen", + "BACK": "Terug", + "CAPTIONS": "Ondertiteling", + "RESOLUTION": "Resolutie", + "AUTO_QUALITY": "Automatisch", + "CAST": "Casten...", + "LANGUAGE": "Taal", + "UNRECOGNIZED_LANGUAGE": "Onbekend", + "UNDETERMINED_LANGUAGE": "Onbekend", + "NOT_APPLICABLE": "Niet van toepassing", + "ENTER_PICTURE_IN_PICTURE": "scherm-in-scherm openen", + "EXIT_PICTURE_IN_PICTURE": "scherm-in-scherm afsluiten", + "PICTURE_IN_PICTURE": "Scherm-in-scherm", + "ON": "aan", + "OFF": "Uit" +} diff --git a/ui/locales/pl.json b/ui/locales/pl.json new file mode 100644 index 0000000000..f091c1df0f --- /dev/null +++ b/ui/locales/pl.json @@ -0,0 +1,29 @@ +{ + "FULL_SCREEN": "Pełny ekran", + "EXIT_FULL_SCREEN": "Zamknij pełny ekran", + "FAST_FORWARD": "Przewiń do przodu", + "REWIND": "Przewiń do tyłu", + "MUTE": "Wycisz", + "UNMUTE": "Wyłącz wyciszenie", + "PAUSE": "Wstrzymaj", + "PLAY": "Odtwarzaj", + "SEEK": "Suwak przewijania", + "VOLUME": "głośność", + "SKIP_TO_LIVE": "Na żywo", + "LIVE": "Na żywo", + "MORE_SETTINGS": "Więcej ustawień", + "BACK": "Wstecz", + "CAPTIONS": "Napisy", + "RESOLUTION": "Rozdzielczość", + "AUTO_QUALITY": "Automatyczna", + "CAST": "Prześlij...", + "LANGUAGE": "Język", + "UNRECOGNIZED_LANGUAGE": "Nieznane", + "UNDETERMINED_LANGUAGE": "Nieznane", + "NOT_APPLICABLE": "Nie dotyczy", + "ENTER_PICTURE_IN_PICTURE": "włącz tryb obrazu w obrazie", + "EXIT_PICTURE_IN_PICTURE": "wyłącz tryb obrazu w obrazie", + "PICTURE_IN_PICTURE": "Obraz w obrazie", + "ON": "wł.", + "OFF": "Wyłączone" +} diff --git a/ui/locales/pt-PT.json b/ui/locales/pt-PT.json new file mode 100644 index 0000000000..d8cdf077b3 --- /dev/null +++ b/ui/locales/pt-PT.json @@ -0,0 +1,30 @@ +{ + "FULL_SCREEN": "Ecrã inteiro", + "EXIT_FULL_SCREEN": "Sair do ecrã inteiro", + "FAST_FORWARD": "Avançar", + "REWIND": "Recuar", + "MUTE": "Desativar o som", + "UNMUTE": "Reativar o som", + "PAUSE": "Colocar em pausa", + "PLAY": "Reproduzir", + "SEEK": "Controlo de deslize da procura", + "VOLUME": "volume", + "SKIP_TO_LIVE": "Em direto", + "LIVE": "Em direto", + "MORE_SETTINGS": "Mais definições", + "BACK": "Anterior", + "CAPTIONS": "Legendas", + "RESOLUTION": "Resolução", + "AUTO_QUALITY": "Automático", + "CAST": "Transmitir...", + "LANGUAGE": "Idioma", + "UNRECOGNIZED_LANGUAGE": "Desconhecida", + "UNDETERMINED_LANGUAGE": "Desconhecida", + "MULTIPLE_LANGUAGES": "vários idiomas", + "NOT_APPLICABLE": "Não aplicável", + "ENTER_PICTURE_IN_PICTURE": "entrar no modo ecrã no ecrã", + "EXIT_PICTURE_IN_PICTURE": "sair do modo ecrã no ecrã", + "PICTURE_IN_PICTURE": "Ecrã no ecrã", + "ON": "ativado", + "OFF": "Desativado" +} diff --git a/ui/locales/pt.json b/ui/locales/pt.json new file mode 100644 index 0000000000..c290e6668b --- /dev/null +++ b/ui/locales/pt.json @@ -0,0 +1,30 @@ +{ + "FULL_SCREEN": "Tela inteira", + "EXIT_FULL_SCREEN": "Sair da tela inteira", + "FAST_FORWARD": "Avançar", + "REWIND": "Retroceder", + "MUTE": "Desativar som", + "UNMUTE": "Ativar som", + "PAUSE": "Pausar", + "PLAY": "Reproduzir", + "SEEK": "Botão deslizante de busca", + "VOLUME": "volume", + "SKIP_TO_LIVE": "Ao vivo", + "LIVE": "Ao vivo", + "MORE_SETTINGS": "Mais configurações", + "BACK": "Voltar", + "CAPTIONS": "Legendas ocultas", + "RESOLUTION": "Resolução", + "AUTO_QUALITY": "Automático", + "CAST": "Elenco...", + "LANGUAGE": "Idioma", + "UNRECOGNIZED_LANGUAGE": "Desconhecido", + "UNDETERMINED_LANGUAGE": "Desconhecido", + "MULTIPLE_LANGUAGES": "vários idiomas", + "NOT_APPLICABLE": "Não aplicável", + "ENTER_PICTURE_IN_PICTURE": "entrar no modo picture-in-picture", + "EXIT_PICTURE_IN_PICTURE": "sair de picture-in-picture", + "PICTURE_IN_PICTURE": "Picture-in-picture", + "ON": "ativado", + "OFF": "Desativado" +} diff --git a/ui/locales/ru.json b/ui/locales/ru.json new file mode 100644 index 0000000000..6134468004 --- /dev/null +++ b/ui/locales/ru.json @@ -0,0 +1,30 @@ +{ + "FULL_SCREEN": "Во весь экран", + "EXIT_FULL_SCREEN": "Выход из полноэкранного режима", + "FAST_FORWARD": "Перемотать вперед", + "REWIND": "Перемотать назад", + "MUTE": "Отключить звук", + "UNMUTE": "Включить звук", + "PAUSE": "Приостановить", + "PLAY": "Смотреть", + "SEEK": "Ползунок поиска", + "VOLUME": "громкость", + "SKIP_TO_LIVE": "Смотреть прямой эфир", + "LIVE": "Прямой эфир", + "MORE_SETTINGS": "Дополнительные настройки", + "BACK": "Назад", + "CAPTIONS": "Субтитры", + "RESOLUTION": "Разрешение", + "AUTO_QUALITY": "Автонастройка", + "CAST": "Хромкаст", + "LANGUAGE": "Язык", + "UNRECOGNIZED_LANGUAGE": "Неизвестно", + "UNDETERMINED_LANGUAGE": "Неизвестно", + "MULTIPLE_LANGUAGES": "поддержка нескольких языков", + "NOT_APPLICABLE": "Неприменимо", + "ENTER_PICTURE_IN_PICTURE": "включить режим \"Картинка в картинке\"", + "EXIT_PICTURE_IN_PICTURE": "выйти из режима \"Картинка в картинке\"", + "PICTURE_IN_PICTURE": "Картинка в картинке", + "ON": "ВКЛ", + "OFF": "Выкл." +} diff --git a/ui/locales/source.json b/ui/locales/source.json new file mode 100644 index 0000000000..86822937b0 --- /dev/null +++ b/ui/locales/source.json @@ -0,0 +1,124 @@ +{ + "FULL_SCREEN": { + "message": "Full screen", + "description": "Label for a button used to enter full screen mode in the video player." + }, + "EXIT_FULL_SCREEN": { + "message": "Exit full screen", + "description": "Label for a button used to exit full screen mode in the video player." + }, + "FAST_FORWARD": { + "message": "Fast-forward", + "description": "Label for a button used to play video at a higher rate than normal." + }, + "REWIND": { + "message": "Rewind", + "description": "Label for a button used to rewind video by seeking repeatedly backward." + }, + "MUTE": { + "message": "Mute", + "description": "Label for a button used to mute the sound in the video player." + }, + "UNMUTE": { + "message": "Unmute", + "description": "Label for a button used to unmute the sound in the video player." + }, + "PAUSE": { + "message": "Pause", + "description": "Label for a button used to pause a video in the video player." + }, + "PLAY": { + "message": "Play", + "description": "Label for a button used to play or unpause video in a video player." + }, + "SEEK": { + "message": "Seek", + "description": "Label for a slider used to show progress or seek to a particular time in a video." + }, + "VOLUME": { + "message": "Volume", + "description": "Label for a slider used to set the volume level of the video player." + }, + "SKIP_TO_LIVE": { + "message": "Skip ahead to live", + "description": "Label for a button used to skip ahead to the live edge of a live video stream." + }, + "LIVE": { + "message": "Live", + "description": "Label to indicate that a video is already playing at the live edge of a live video stream." + }, + "MORE_SETTINGS": { + "message": "More settings", + "description": "Label for a button used to open a menu with additional settings in the video player." + }, + + "BACK": { + "message": "Back", + "meaning": "Return to previous menu", + "description": "Label for a button used to return to the previous menu in the video player's settings." + }, + + "CAPTIONS": { + "message": "Captions", + "description": "Label for a button used to navigate to a submenu to choose captions/subtitles in the video player." + }, + + "RESOLUTION": { + "message": "Resolution", + "meaning": "Visual quality", + "description": "Label for a button used to open a submenu to choose a video resolution in the video player." + }, + "AUTO_QUALITY": { + "message": "Auto", + "meaning": "Automatic", + "description": "Label for a button used to allow the video player to select the resolution/quality of the video automatically." + }, + + "CAST": { + "message": "Cast...", + "description": "Label for a button used to open the native Cast dialog in the browser and select a destination to Cast to." + }, + + "LANGUAGE": { + "message": "Language", + "description": "Label for a button used to navigate to a submenu to choose the audio language in the video player." + }, + "UNRECOGNIZED_LANGUAGE": { + "message": "Unrecognized", + "description": "Label for a button used to select an audio language whose language code we do not recognize. This will be followed by the language code in parentheses. For example, \"Unrecognized (sjn)\"." + }, + "UNDETERMINED_LANGUAGE": { + "message": "Undetermined", + "description": "Label for a button used to select an audio track whose language is undetermined or unknown." + }, + "MULTIPLE_LANGUAGES": { + "message": "Multiple languages", + "description": "Label for a button used to select an audio track which contains content in multiple languages." + }, + "NOT_APPLICABLE": { + "message": "Not applicable", + "description": "Label for a button used to select an audio track for which language is not applicable, such as content without spoken words." + }, + + "ENTER_PICTURE_IN_PICTURE": { + "message": "Enter Picture-in-Picture", + "description": "Label for a button used to enter Picture-in-Picture mode in a video player. This mode will float the video on top of the user's desktop and allow them to continue viewing while using other applications." + }, + "EXIT_PICTURE_IN_PICTURE": { + "message": "Exit Picture-in-Picture", + "description": "Label for a button used to exit Picture-in-Picture mode in a video player. This will bring the video back into the web page, rather than floating on top of the user's desktop." + }, + "PICTURE_IN_PICTURE": { + "message": "Picture-in-Picture", + "description": "Label for a button used to control the Picture-in-Picture mode of a video player. This mode will float the video on top of the user's desktop and allow them to continue viewing while using other applications." + }, + + "ON": { + "message": "On", + "description": "Title beneath a button showing that this feature of the video player is current enabled. Currently used for Picture-in-Picture, but could apply to other features in the future." + }, + "OFF": { + "message": "Off", + "description": "Title beneath a button showing that this feature of the video player is not currently enabled. Currently used for Cast, Picture-in-Picture, and Captions/Subtitles, but could apply to other features in the future." + } +} diff --git a/ui/locales/th.json b/ui/locales/th.json new file mode 100644 index 0000000000..7d636134e4 --- /dev/null +++ b/ui/locales/th.json @@ -0,0 +1,29 @@ +{ + "FULL_SCREEN": "เต็มหน้าจอ", + "EXIT_FULL_SCREEN": "ออกจากโหมดเต็มหน้าจอ", + "FAST_FORWARD": "กรอไปข้างหน้า", + "REWIND": "กรอกลับ", + "MUTE": "ปิดเสียง", + "UNMUTE": "เปิดเสียง", + "PAUSE": "หยุดชั่วคราว", + "PLAY": "เล่น", + "SEEK": "แถบเลื่อนค้นหา", + "VOLUME": "ระดับเสียง", + "SKIP_TO_LIVE": "สด", + "LIVE": "สด", + "MORE_SETTINGS": "การตั้งค่าเพิ่มเติม", + "BACK": "กลับ", + "CAPTIONS": "คำอธิบายวิดีโอ", + "RESOLUTION": "ความละเอียด", + "AUTO_QUALITY": "อัตโนมัติ", + "CAST": "แคสต์...", + "LANGUAGE": "ภาษา", + "UNRECOGNIZED_LANGUAGE": "ไม่ทราบ", + "UNDETERMINED_LANGUAGE": "ไม่ทราบ", + "NOT_APPLICABLE": "ไม่เกี่ยวข้อง", + "ENTER_PICTURE_IN_PICTURE": "เข้าสู่การแสดงภาพซ้อนภาพ", + "EXIT_PICTURE_IN_PICTURE": "ออกจากการแสดงภาพซ้อนภาพ", + "PICTURE_IN_PICTURE": "การแสดงภาพซ้อนภาพ", + "ON": "เปิด", + "OFF": "ปิด" +} diff --git a/ui/locales/tr.json b/ui/locales/tr.json new file mode 100644 index 0000000000..8714a9fc9a --- /dev/null +++ b/ui/locales/tr.json @@ -0,0 +1,29 @@ +{ + "FULL_SCREEN": "Tam ekran", + "EXIT_FULL_SCREEN": "Tam ekrandan çık", + "FAST_FORWARD": "İleri sar", + "REWIND": "Geri sar", + "MUTE": "Sesi kapat", + "UNMUTE": "Sesi aç", + "PAUSE": "Duraklat", + "PLAY": "Oynat", + "SEEK": "Arama kaydırma çubuğu", + "VOLUME": "ses düzeyi", + "SKIP_TO_LIVE": "Canlı", + "LIVE": "Canlı", + "MORE_SETTINGS": "Diğer ayarlar", + "BACK": "Geri", + "CAPTIONS": "Altyazılar", + "RESOLUTION": "Çözünürlük", + "AUTO_QUALITY": "Otomatik", + "CAST": "Yayınla...", + "LANGUAGE": "Dil", + "UNRECOGNIZED_LANGUAGE": "Bilinmiyor", + "UNDETERMINED_LANGUAGE": "Bilinmiyor", + "NOT_APPLICABLE": "Kullanılmıyor", + "ENTER_PICTURE_IN_PICTURE": "pencere içinde pencere moduna gir", + "EXIT_PICTURE_IN_PICTURE": "pencere içinde pencere modundan çıkın", + "PICTURE_IN_PICTURE": "Pencere içinde Pencere", + "ON": "açık", + "OFF": "Kapalı" +} diff --git a/ui/locales/zh-HK.json b/ui/locales/zh-HK.json new file mode 100644 index 0000000000..e400c30655 --- /dev/null +++ b/ui/locales/zh-HK.json @@ -0,0 +1,30 @@ +{ + "FULL_SCREEN": "全螢幕", + "EXIT_FULL_SCREEN": "結束全螢幕", + "FAST_FORWARD": "快轉", + "REWIND": "倒帶", + "MUTE": "靜音", + "UNMUTE": "解除靜音", + "PAUSE": "暫停", + "PLAY": "播放", + "SEEK": "搜尋滑桿", + "VOLUME": "音量", + "SKIP_TO_LIVE": "直播", + "LIVE": "直播", + "MORE_SETTINGS": "更多設定", + "BACK": "返回", + "CAPTIONS": "字幕", + "RESOLUTION": "", + "AUTO_QUALITY": "自動", + "CAST": "投放…", + "LANGUAGE": "語言", + "UNRECOGNIZED_LANGUAGE": "不明", + "UNDETERMINED_LANGUAGE": "不明", + "MULTIPLE_LANGUAGES": "多種語言", + "NOT_APPLICABLE": "不適用", + "ENTER_PICTURE_IN_PICTURE": "進入畫中畫", + "EXIT_PICTURE_IN_PICTURE": "退出畫中畫", + "PICTURE_IN_PICTURE": "畫中畫", + "ON": "", + "OFF": "未選取" +} diff --git a/ui/locales/zh-TW.json b/ui/locales/zh-TW.json new file mode 100644 index 0000000000..6f1d12f0b2 --- /dev/null +++ b/ui/locales/zh-TW.json @@ -0,0 +1,29 @@ +{ + "FULL_SCREEN": "全螢幕", + "EXIT_FULL_SCREEN": "結束全螢幕", + "FAST_FORWARD": "快轉", + "REWIND": "倒轉", + "MUTE": "靜音", + "UNMUTE": "解除靜音", + "PAUSE": "暫停", + "PLAY": "播放", + "SEEK": "搜尋滑桿", + "VOLUME": "音量", + "SKIP_TO_LIVE": "直播", + "LIVE": "直播", + "MORE_SETTINGS": "更多設定", + "BACK": "返回", + "CAPTIONS": "字幕", + "RESOLUTION": "解析度", + "AUTO_QUALITY": "自動", + "CAST": "投放…", + "LANGUAGE": "語言", + "UNRECOGNIZED_LANGUAGE": "未知", + "UNDETERMINED_LANGUAGE": "未知", + "NOT_APPLICABLE": "不適用", + "ENTER_PICTURE_IN_PICTURE": "進入子母畫面", + "EXIT_PICTURE_IN_PICTURE": "離開子母畫面", + "PICTURE_IN_PICTURE": "子母畫面", + "ON": "開啟", + "OFF": "關閉" +} diff --git a/ui/locales/zh.json b/ui/locales/zh.json new file mode 100644 index 0000000000..4999becfa5 --- /dev/null +++ b/ui/locales/zh.json @@ -0,0 +1,29 @@ +{ + "FULL_SCREEN": "全屏", + "EXIT_FULL_SCREEN": "退出全屏", + "FAST_FORWARD": "快进", + "REWIND": "快退", + "MUTE": "静音", + "UNMUTE": "取消静音", + "PAUSE": "暂停", + "PLAY": "播放", + "SEEK": "播放滑块", + "VOLUME": "音量", + "SKIP_TO_LIVE": "直播", + "LIVE": "直播", + "MORE_SETTINGS": "更多设置", + "BACK": "返回", + "CAPTIONS": "字幕", + "RESOLUTION": "分辨率", + "AUTO_QUALITY": "自动", + "CAST": "投射…", + "LANGUAGE": "语言", + "UNRECOGNIZED_LANGUAGE": "未知", + "UNDETERMINED_LANGUAGE": "未知", + "NOT_APPLICABLE": "不適用", + "ENTER_PICTURE_IN_PICTURE": "进入“画中画”模式", + "EXIT_PICTURE_IN_PICTURE": "退出“画中画”模式", + "PICTURE_IN_PICTURE": "画中画", + "ON": "开启", + "OFF": "关闭" +} diff --git a/ui/mute_button.js b/ui/mute_button.js index 186ead9835..d5cb33b2c2 100644 --- a/ui/mute_button.js +++ b/ui/mute_button.js @@ -71,8 +71,7 @@ shaka.ui.MuteButton = class extends shaka.ui.Element { */ updateAriaLabel_() { const LocIds = shaka.ui.Locales.Ids; - const label = - this.video.muted ? LocIds.ARIA_LABEL_UNMUTE : LocIds.ARIA_LABEL_MUTE; + const label = this.video.muted ? LocIds.UNMUTE : LocIds.MUTE; this.button_.setAttribute(shaka.ui.Constants.ARIA_LABEL, this.localization.resolve(label)); diff --git a/ui/overflow_menu.js b/ui/overflow_menu.js index 30cd1551f1..e388644f1a 100644 --- a/ui/overflow_menu.js +++ b/ui/overflow_menu.js @@ -202,7 +202,7 @@ goog.require('shaka.util.Dom'); updateAriaLabel_() { const LocIds = shaka.ui.Locales.Ids; this.overflowMenuButton_.setAttribute(shaka.ui.Constants.ARIA_LABEL, - this.localization.resolve(LocIds.ARIA_LABEL_MORE_SETTINGS)); + this.localization.resolve(LocIds.MORE_SETTINGS)); } }; diff --git a/ui/pip_button.js b/ui/pip_button.js index 63e7716420..90694f09d9 100644 --- a/ui/pip_button.js +++ b/ui/pip_button.js @@ -57,7 +57,7 @@ shaka.ui.PipButton = class extends shaka.ui.Element { label.classList.add('shaka-overflow-button-label'); this.pipNameSpan_ = shaka.util.Dom.createHTMLElement('span'); this.pipNameSpan_.textContent = - this.localization.resolve(LocIds.LABEL_PICTURE_IN_PICTURE); + this.localization.resolve(LocIds.PICTURE_IN_PICTURE); label.appendChild(this.pipNameSpan_); /** @private {!HTMLElement} */ @@ -144,9 +144,9 @@ shaka.ui.PipButton = class extends shaka.ui.Element { const LocIds = shaka.ui.Locales.Ids; this.pipIcon_.textContent = shaka.ui.Enums.MaterialDesignIcons.EXIT_PIP; this.pipButton_.setAttribute(shaka.ui.Constants.ARIA_LABEL, - this.localization.resolve(LocIds.ARIA_LABEL_EXIT_PICTURE_IN_PICTURE)); + this.localization.resolve(LocIds.EXIT_PICTURE_IN_PICTURE)); this.currentPipState_.textContent = - this.localization.resolve(LocIds.LABEL_PICTURE_IN_PICTURE_ON); + this.localization.resolve(LocIds.ON); } @@ -155,9 +155,9 @@ shaka.ui.PipButton = class extends shaka.ui.Element { const LocIds = shaka.ui.Locales.Ids; this.pipIcon_.textContent = shaka.ui.Enums.MaterialDesignIcons.PIP; this.pipButton_.setAttribute(shaka.ui.Constants.ARIA_LABEL, - this.localization.resolve(LocIds.ARIA_LABEL_ENTER_PICTURE_IN_PICTURE)); + this.localization.resolve(LocIds.ENTER_PICTURE_IN_PICTURE)); this.currentPipState_.textContent = - this.localization.resolve(LocIds.LABEL_PICTURE_IN_PICTURE_OFF); + this.localization.resolve(LocIds.OFF); } @@ -168,17 +168,16 @@ shaka.ui.PipButton = class extends shaka.ui.Element { const LocIds = shaka.ui.Locales.Ids; this.pipNameSpan_.textContent = - this.localization.resolve(LocIds.LABEL_PICTURE_IN_PICTURE); + this.localization.resolve(LocIds.PICTURE_IN_PICTURE); const ariaLabel = document.pictureInPictureElement ? - LocIds.ARIA_LABEL_EXIT_PICTURE_IN_PICTURE : - LocIds.ARIA_LABEL_ENTER_PICTURE_IN_PICTURE; + LocIds.EXIT_PICTURE_IN_PICTURE : + LocIds.ENTER_PICTURE_IN_PICTURE; this.pipButton_.setAttribute(shaka.ui.Constants.ARIA_LABEL, this.localization.resolve(ariaLabel)); const currentPipState = document.pictureInPictureElement ? - LocIds.LABEL_PICTURE_IN_PICTURE_ON : - LocIds.LABEL_PICTURE_IN_PICTURE_OFF; + LocIds.ON : LocIds.OFF; this.currentPipState_.textContent = this.localization.resolve(currentPipState); diff --git a/ui/presentation_time.js b/ui/presentation_time.js index 7e7bc407f3..ee38cdb56e 100644 --- a/ui/presentation_time.js +++ b/ui/presentation_time.js @@ -85,7 +85,7 @@ shaka.ui.PresentationTimeTracker = class extends shaka.ui.Element { this.currentTime_.disabled = false; } else { this.currentTime_.textContent = - this.localization.resolve(shaka.ui.Locales.Ids.LABEL_LIVE); + this.localization.resolve(shaka.ui.Locales.Ids.LIVE); this.currentTime_.disabled = true; } } else { @@ -129,7 +129,7 @@ shaka.ui.PresentationTimeTracker = class extends shaka.ui.Element { */ onTracksChanged_() { if (this.player.isLive()) { - const ariaLabel = shaka.ui.Locales.Ids.ARIA_LABEL_LIVE; + const ariaLabel = shaka.ui.Locales.Ids.SKIP_TO_LIVE; this.currentTime_.setAttribute(shaka.ui.Constants.ARIA_LABEL, this.localization.resolve(ariaLabel)); } diff --git a/ui/resolution_selection.js b/ui/resolution_selection.js index 76ca7bd3e2..c7c31eefd4 100644 --- a/ui/resolution_selection.js +++ b/ui/resolution_selection.js @@ -226,7 +226,7 @@ shaka.ui.ResolutionSelection = class extends shaka.ui.Element { const autoSpan = shaka.util.Dom.createHTMLElement('span'); autoSpan.textContent = - this.localization.resolve(shaka.ui.Locales.Ids.LABEL_AUTO_QUALITY); + this.localization.resolve(shaka.ui.Locales.Ids.AUTO_QUALITY); autoButton.appendChild(autoSpan); // If abr is enabled reflect it by marking 'Auto' as selected. @@ -237,7 +237,7 @@ shaka.ui.ResolutionSelection = class extends shaka.ui.Element { autoSpan.classList.add('shaka-chosen-item'); this.currentResolution_.textContent = - this.localization.resolve(shaka.ui.Locales.Ids.LABEL_AUTO_QUALITY); + this.localization.resolve(shaka.ui.Locales.Ids.AUTO_QUALITY); } this.resolutionMenu_.appendChild(autoButton); @@ -272,15 +272,15 @@ shaka.ui.ResolutionSelection = class extends shaka.ui.Element { const LocIds = shaka.ui.Locales.Ids; this.resolutionButton_.setAttribute(shaka.ui.Constants.ARIA_LABEL, - this.localization.resolve(LocIds.ARIA_LABEL_RESOLUTION)); + this.localization.resolve(LocIds.RESOLUTION)); this.backFromResolutionButton_.setAttribute(shaka.ui.Constants.ARIA_LABEL, - this.localization.resolve(LocIds.ARIA_LABEL_RESOLUTION)); + this.localization.resolve(LocIds.RESOLUTION)); this.backFromResolutionSpan_.textContent = - this.localization.resolve(LocIds.LABEL_RESOLUTION); + this.localization.resolve(LocIds.RESOLUTION); this.resolutionNameSpan_.textContent = - this.localization.resolve(LocIds.LABEL_RESOLUTION); + this.localization.resolve(LocIds.RESOLUTION); this.abrOnSpan_.textContent = - this.localization.resolve(LocIds.LABEL_AUTO_QUALITY); + this.localization.resolve(LocIds.AUTO_QUALITY); } }; diff --git a/ui/rewind_button.js b/ui/rewind_button.js index 31b3aa8e8b..fbec666f5d 100644 --- a/ui/rewind_button.js +++ b/ui/rewind_button.js @@ -67,7 +67,7 @@ shaka.ui.RewindButton = class extends shaka.ui.Element { */ updateAriaLabel_() { this.button_.setAttribute(shaka.ui.Constants.ARIA_LABEL, - this.localization.resolve(shaka.ui.Locales.Ids.ARIA_LABEL_REWIND)); + this.localization.resolve(shaka.ui.Locales.Ids.REWIND)); } /** diff --git a/ui/text_selection.js b/ui/text_selection.js index cfad47269c..e62eda903d 100644 --- a/ui/text_selection.js +++ b/ui/text_selection.js @@ -225,7 +225,7 @@ shaka.ui.TextSelection = class extends shaka.ui.Element { offButton.appendChild(shaka.ui.Utils.checkmarkIcon()); this.captionsOffSpan_.classList.add('shaka-chosen-item'); this.currentCaptions_.textContent = - this.localization.resolve(shaka.ui.Locales.Ids.LABEL_CAPTIONS_OFF); + this.localization.resolve(shaka.ui.Locales.Ids.OFF); } shaka.ui.Utils.focusOnTheChosenItem(this.textLangMenu_); @@ -254,15 +254,15 @@ shaka.ui.TextSelection = class extends shaka.ui.Element { const LocIds = shaka.ui.Locales.Ids; this.captionButton_.setAttribute(shaka.ui.Constants.ARIA_LABEL, - this.localization.resolve(LocIds.ARIA_LABEL_CAPTIONS)); + this.localization.resolve(LocIds.CAPTIONS)); this.backFromCaptionsButton_.setAttribute(shaka.ui.Constants.ARIA_LABEL, - this.localization.resolve(LocIds.ARIA_LABEL_BACK)); + this.localization.resolve(LocIds.BACK)); this.captionsNameSpan_.textContent = - this.localization.resolve(LocIds.LABEL_CAPTIONS); + this.localization.resolve(LocIds.CAPTIONS); this.backFromCaptionsSpan_.textContent = - this.localization.resolve(LocIds.LABEL_CAPTIONS); + this.localization.resolve(LocIds.CAPTIONS); this.captionsOffSpan_.textContent = - this.localization.resolve(LocIds.LABEL_CAPTIONS_OFF); + this.localization.resolve(LocIds.OFF); } diff --git a/ui/volume_bar.js b/ui/volume_bar.js index bf53a58771..65505e4ce0 100644 --- a/ui/volume_bar.js +++ b/ui/volume_bar.js @@ -120,7 +120,7 @@ shaka.ui.VolumeBar = class extends shaka.ui.Element { */ updateAriaLabel_() { this.bar_.setAttribute(shaka.ui.Constants.ARIA_LABEL, - this.localization.resolve(shaka.ui.Locales.Ids.ARIA_LABEL_VOLUME)); + this.localization.resolve(shaka.ui.Locales.Ids.VOLUME)); } };