From 2247af7e95954f78af85531be32d2ca9262f9977 Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Sat, 17 Mar 2018 16:18:21 +0100 Subject: [PATCH] Update translations This required changing the import script in two ways: - we should use the `default` branch and not the `tip` tag since the latter may refer to another branch than `default` (this is the case for the `vi` locale, which caused in the files to be overwritten with incorrect contents since `tip` referred to the `THUNDERBIRD600b1_2018031614_RELBRANCH` branch); - we should check if the response code is indeed 200 because recently a script removed all empty localization files upstream (refer to https://bugzilla.mozilla.org/show_bug.cgi?id=1443175). --- external/importL10n/locales.js | 27 ++++++++++++++++++--------- l10n/lij/viewer.properties | 4 ++++ l10n/mn/chrome.properties | 15 --------------- l10n/ro/viewer.properties | 2 +- l10n/rw/chrome.properties | 15 --------------- l10n/sq/viewer.properties | 20 ++++++++++---------- l10n/ta-LK/chrome.properties | 15 --------------- l10n/th/viewer.properties | 4 ++-- l10n/tn/chrome.properties | 15 --------------- 9 files changed, 35 insertions(+), 82 deletions(-) delete mode 100644 l10n/mn/chrome.properties delete mode 100644 l10n/rw/chrome.properties delete mode 100644 l10n/ta-LK/chrome.properties delete mode 100644 l10n/tn/chrome.properties diff --git a/external/importL10n/locales.js b/external/importL10n/locales.js index 339e24028..2693c46a5 100644 --- a/external/importL10n/locales.js +++ b/external/importL10n/locales.js @@ -46,7 +46,7 @@ function downloadLanguageFiles(root, langCode, callback) { // Constants for constructing the URLs. Translations are taken from the // Nightly channel as those are the most recent ones. var MOZ_CENTRAL_ROOT = 'https://hg.mozilla.org/l10n-central/'; - var MOZ_CENTRAL_PDFJS_DIR = '/raw-file/tip/browser/pdfviewer/'; + var MOZ_CENTRAL_PDFJS_DIR = '/raw-file/default/browser/pdfviewer/'; // Defines which files to download for each language. var files = ['chrome.properties', 'viewer.properties']; @@ -63,18 +63,27 @@ function downloadLanguageFiles(root, langCode, callback) { var url = MOZ_CENTRAL_ROOT + langCode + MOZ_CENTRAL_PDFJS_DIR + fileName; https.get(url, function(response) { - var content = ''; - response.setEncoding('utf8'); - response.on('data', function(chunk) { - content += chunk; - }); - response.on('end', function() { - fs.writeFileSync(outputPath, normalizeText(content), 'utf8'); + // Not all files exist for each language. Files without translations have + // been removed (https://bugzilla.mozilla.org/show_bug.cgi?id=1443175). + if (response.statusCode === 200) { + var content = ''; + response.setEncoding('utf8'); + response.on('data', function(chunk) { + content += chunk; + }); + response.on('end', function() { + fs.writeFileSync(outputPath, normalizeText(content), 'utf8'); + downloadsLeft--; + if (downloadsLeft === 0) { + callback(); + } + }); + } else { downloadsLeft--; if (downloadsLeft === 0) { callback(); } - }); + } }); }); } diff --git a/l10n/lij/viewer.properties b/l10n/lij/viewer.properties index 3d532ac19..36107a5e1 100644 --- a/l10n/lij/viewer.properties +++ b/l10n/lij/viewer.properties @@ -60,6 +60,10 @@ page_rotate_ccw.title=Gia into verso antioraio page_rotate_ccw.label=Gia in senso do releuio a-a reversa page_rotate_ccw_label=Gia into verso antioraio +cursor_text_select_tool.title=Abilita strumento de seleçion do testo +cursor_text_select_tool_label=Strumento de seleçion do testo +cursor_hand_tool.title=Abilita strumento man +cursor_hand_tool_label=Strumento man # Document properties dialog box document_properties.title=Propietæ do documento… diff --git a/l10n/mn/chrome.properties b/l10n/mn/chrome.properties deleted file mode 100644 index 73ebae02e..000000000 --- a/l10n/mn/chrome.properties +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2012 Mozilla Foundation -# -# 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. - -# Chrome notification bar messages and buttons diff --git a/l10n/ro/viewer.properties b/l10n/ro/viewer.properties index cccdd4f46..c70aab83a 100644 --- a/l10n/ro/viewer.properties +++ b/l10n/ro/viewer.properties @@ -128,7 +128,7 @@ find_previous_label=Anterior find_next.title=Găsește instanța următoare în frază find_next_label=Următor find_highlight=Evidențiază aparițiile -find_match_case_label=Majuscule semnificative +find_match_case_label=Potrivește literele mari și mici find_reached_top=Am ajuns la începutul documentului, continuă de la sfârșit find_reached_bottom=Am ajuns la sfârșitul documentului, continuă de la început find_not_found=Nu s-a găsit textul diff --git a/l10n/rw/chrome.properties b/l10n/rw/chrome.properties deleted file mode 100644 index 73ebae02e..000000000 --- a/l10n/rw/chrome.properties +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2012 Mozilla Foundation -# -# 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. - -# Chrome notification bar messages and buttons diff --git a/l10n/sq/viewer.properties b/l10n/sq/viewer.properties index 2f6561d47..632db01b5 100644 --- a/l10n/sq/viewer.properties +++ b/l10n/sq/viewer.properties @@ -28,10 +28,10 @@ of_pages=nga {{pagesCount}} gjithsej # respectively a number representing the total number of pages in the document. page_of_pages=({{pageNumber}} nga {{pagesCount}}) -zoom_out.title=Zmadhim -zoom_out_label=Zmadhoji -zoom_in.title=Zvogëlim -zoom_in_label=Zvogëloji +zoom_out.title=Zvogëlim +zoom_out_label=Zvogëlojini +zoom_in.title=Zmadhim +zoom_in_label=Zmadhojini zoom.title=Zoom presentation_mode.title=Kalo te Mënyra Paraqitje presentation_mode_label=Mënyra Paraqitje @@ -48,11 +48,11 @@ bookmark_label=Pamja e Tanishme tools.title=Mjete tools_label=Mjete first_page.title=Kaloni te Faqja e Parë -first_page.label=Kalo te Faqja e Parë -first_page_label=Kalo te Faqja e Parë +first_page.label=Kaloni te Faqja e Parë +first_page_label=Kaloni te Faqja e Parë last_page.title=Kaloni te Faqja e Fundit -last_page.label=Kalo te Faqja e Fundit -last_page_label=Kalo te Faqja e Fundit +last_page.label=Kaloni te Faqja e Fundit +last_page_label=Kaloni te Faqja e Fundit page_rotate_cw.title=Rrotullojeni Në Kahun Orar page_rotate_cw.label=Rrotulloje Në Kahun Orar page_rotate_cw_label=Rrotulloje Në Kahun Orar @@ -89,7 +89,7 @@ document_properties_creator=Krijues: document_properties_producer=Prodhues PDF-je: document_properties_version=Version PDF-je: document_properties_page_count=Numër Faqesh: -document_properties_close=Mbylle +document_properties_close=Mbylleni print_progress_message=Po përgatitet dokumenti për shtypje… # LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by @@ -136,7 +136,7 @@ find_not_found=Togfjalësh që s’gjendet # Error panel labels error_more_info=Më Tepër të Dhëna error_less_info=Më Pak të Dhëna -error_close=Mbylle +error_close=Mbylleni # LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be # replaced by the PDF.JS version and build ID. error_version_info=PDF.js v{{version}} (build: {{build}}) diff --git a/l10n/ta-LK/chrome.properties b/l10n/ta-LK/chrome.properties deleted file mode 100644 index 73ebae02e..000000000 --- a/l10n/ta-LK/chrome.properties +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2012 Mozilla Foundation -# -# 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. - -# Chrome notification bar messages and buttons diff --git a/l10n/th/viewer.properties b/l10n/th/viewer.properties index d244d0be6..0cbc9eebe 100644 --- a/l10n/th/viewer.properties +++ b/l10n/th/viewer.properties @@ -72,10 +72,10 @@ document_properties_file_name=ชื่อไฟล์: document_properties_file_size=ขนาดไฟล์: # LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" # will be replaced by the PDF file size in kilobytes, respectively in bytes. -document_properties_kb={{size_kb}} กิโลไบต์ ({{size_b}} ไบต์) +document_properties_kb={{size_kb}} KB ({{size_b}} ไบต์) # LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" # will be replaced by the PDF file size in megabytes, respectively in bytes. -document_properties_mb={{size_mb}} เมกะไบต์ ({{size_b}} ไบต์) +document_properties_mb={{size_mb}} MB ({{size_b}} ไบต์) document_properties_title=ชื่อ: document_properties_author=ผู้สร้าง: document_properties_subject=ชื่อเรื่อง: diff --git a/l10n/tn/chrome.properties b/l10n/tn/chrome.properties deleted file mode 100644 index 73ebae02e..000000000 --- a/l10n/tn/chrome.properties +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2012 Mozilla Foundation -# -# 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. - -# Chrome notification bar messages and buttons