Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import l10n files from mozilla-aurora #4504

Merged
merged 3 commits into from
Mar 26, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# PDF.js issue reporting

The issues are used to track both bugs filed by users and specific work items for developers. Try to file one issue per problem observed. Please specify valid title (e.g. "Glyph spacing is incorrect" instead of "PDF.js does not work") and provide more details about the issue: link to the PDF, location in the PDF, screenshot, browser version, operating system, PDF.js version and JavaScript console warning/error messages. The issues that do not have enough details provided will be closed as invalid/incomplete.
The issues are used to track both bugs filed by users and specific work items for developers. Try to file one issue per problem observed. Please specify a valid title (e.g. "Glyph spacing is incorrect" instead of "PDF.js does not work") and provide more details about the issue: link to the PDF, location in the PDF, screenshot, browser version, operating system, PDF.js version and JavaScript console warning/error messages. Issues that do not have enough details provided will be closed as invalid/incomplete.

The issue tracking system is designed to record a single technical problem. A bug report is something where a developer/contributor can work on. The GitHub issue tracker is not a good place for general, not well thought out or unworkable ideas. Most likely a discussion-type issue will not be addressed for a long time or closed as invalid. The best place is our [email protected] mailing list. You can subscribe to it using http://lists.mozilla.org or Google Groups. This way you will reach not only developers. As an alternative, you can join our weekly engineering meeting to discuss new ideas for the project.

If you are developing a custom solution, first check examples at https://github.com/mozilla/pdf.js#learning and search existing issues. If this does not help, please prepare short well-documented example that demonstrate the problem and make it accessible online on your website, jsbin, github, etc. before opening a new issue or contacting us on the IRC channel -- keep in mind that just code snippets won't help us troubleshoot the problem. The issues that do not provide enough details will be closed as invalid/incomplete.
If you are developing a custom solution, first check the examples at https://github.com/mozilla/pdf.js#learning and search existing issues. If this does not help, please prepare a short well-documented example that demonstrates the problem and make it accessible online on your website, JS Bin, GitHub, etc. before opening a new issue or contacting us on the IRC channel -- keep in mind that just code snippets won't help us troubleshoot the problem.

Note that the translations for PDF.js in the `l10n` folder are synchronized with the Aurora branch of Mozilla Firefox. This means that we will only accept pull requests that add strings currently missing in the Aurora branch (because it will take at least six weeks before the most recent translations are in the Aurora branch), but keep in mind that the changes will be overwritten when we synchronize again.

See also:
- https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions
Expand Down
88 changes: 88 additions & 0 deletions external/importL10n/locales.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* 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.
*/
/* jshint node:true */

'use strict';

var fs = require('fs');
var http = require('http');
var path = require('path');

// Defines all languages that have a translation at mozilla-aurora.
// This is used in make.js for the importl10n command.
var langCodes = [
'ach', 'af', 'ak', 'an', 'ar', 'as', 'ast', 'az', 'be', 'bg',
'bn-BD', 'bn-IN', 'br', 'bs', 'ca', 'cs', 'csb', 'cy', 'da',
'de', 'el', 'en-GB', 'en-ZA', 'eo', 'es-AR', 'es-CL', 'es-ES',
'es-MX', 'et', 'eu', 'fa', 'ff', 'fi', 'fr', 'fy-NL', 'ga-IE',
'gd', 'gl', 'gu-IN', 'he', 'hi-IN', 'hr', 'hu', 'hy-AM', 'id',
'is', 'it', 'ja', 'ka', 'kk', 'km', 'kn', 'ko', 'ku', 'lg',
'lij', 'lt', 'lv', 'mai', 'mk', 'ml', 'mn', 'mr', 'ms', 'my',
'nb-NO', 'nl', 'nn-NO', 'nso', 'oc', 'or', 'pa-IN', 'pl',
'pt-BR', 'pt-PT', 'rm', 'ro', 'ru', 'rw', 'sah', 'si', 'sk',
'sl', 'son', 'sq', 'sr', 'sv-SE', 'sw', 'ta', 'ta-LK', 'te',
'th', 'tl', 'tn', 'tr', 'uk', 'ur', 'vi', 'wo', 'xh', 'zh-CN',
'zh-TW', 'zu'
];

function downloadLanguageFiles(langCode, callback) {
console.log('Downloading ' + langCode + '...');

// Constants for constructing the URLs. Translations are taken from the
// Aurora channel as those are the most recent ones. The Nightly channel
// does not provide all translations.
var MOZCENTRAL_ROOT = 'http://mxr.mozilla.org/l10n-mozilla-aurora/source/';
var MOZCENTRAL_PDFJS_DIR = '/browser/pdfviewer/';
var MOZCENTRAL_RAW_FLAG = '?raw=1';

// Defines which files to download for each language.
var files = ['chrome.properties', 'viewer.properties'];
var downloadsLeft = files.length;

if (!fs.existsSync(langCode)) {
fs.mkdirSync(langCode);
}

// Download the necessary files for this language.
files.forEach(function(fileName) {
var outputPath = path.join(langCode, fileName);
var file = fs.createWriteStream(outputPath);
var url = MOZCENTRAL_ROOT + langCode + MOZCENTRAL_PDFJS_DIR +
fileName + MOZCENTRAL_RAW_FLAG;
var request = http.get(url, function(response) {
response.pipe(file);
response.on('end', function() {
downloadsLeft--;
if (downloadsLeft === 0) {
callback();
}
})
});
});
}

function downloadL10n() {
var i = 0;
(function next() {
if (i >= langCodes.length) {
return;
}
downloadLanguageFiles(langCodes[i++], next);
})();
}

exports.downloadL10n = downloadL10n;
5 changes: 5 additions & 0 deletions l10n/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Most of the files in this folder (except for the `en-US` folder and the
`metadata.inc` files) have been imported from the Firefox Aurora branch,
which is located at https://mxr.mozilla.org/l10n-mozilla-aurora/source.
Some of the files are licensed under the MPL license. You can obtain a
copy of the license at http://mozilla.org/MPL/2.0.
5 changes: 2 additions & 3 deletions l10n/no/chrome.properties → l10n/ach/chrome.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.

# Chrome notification bar messages and buttons
unsupported_feature=Dette PDF-dokumentet vert kanskje ikkje vist rett.
open_with_different_viewer=Opne med eit anna visingsprogram
unsupported_feature=Pe ki biyaro kakare coc acoya man me PDF.
open_with_different_viewer=Yab Ki Gin maneno mapat pat
open_with_different_viewer.accessKey=o

97 changes: 97 additions & 0 deletions l10n/ach/viewer.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# 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.

# Main toolbar buttons (tooltips and alt text for images)
previous.title=Pot buk Mukato
next.title=Pot buk Malubo Kore

# LOCALIZATION NOTE (page_label, page_of):
# These strings are concatenated to form the "Page: X of Y" string.
# Do not translate "{{pageCount}}", it will be substituted with a number
# representing the total number of pages.
page_label=Pot buk:
page_of=pi {{pageCount}}

zoom_out.title=Dwogo Woko
zoom_out_label=Dwogo Woko
zoom_in.title=Dwogo iyie
zoom_in_label=Dwogo iyie
zoom.title=Kwoti
print.title=Goo
print_label=Goo
open_file.title=Yab Pwail
open_file_label=Yabi
download.title=Gam
download_label=Gam
bookmark.title=Neno matye (loki onyo yabi i dirica manyen)
bookmark_label=Neno Matye

# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
outline.title=Nyut ryeno rek pa Coc acoya
outline_label=Ryeno rek me Coc acoya
thumbs.title=Nyut Capa cing
thumbs_label=Capa cing
findbar_label=Nong

# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=Pot buk {{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas=Capa cing e Pot buk {{page}}

# Context menu

# Find panel button title and messages
find_previous.title=Nong en matime malubo kore pi lok
find_next.title=Nong en matime malubo kore pi lok
find_not_found=Phrase pe ononge

# Error panel labels
error_more_info=Ngec Mukene
error_close=Lor
# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
# replaced by the PDF.JS version and build ID.
# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
# english string describing the error.
error_message=Kwena: {{message}}
# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
# trace.
error_stack=Agiki onyo acaki {{stack}}
# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
error_file=Pwail: {{file}}
# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
error_line=Rek: {{line}}
rendering_error=Bal otyeko time kun jalo pot buk.

# Predefined zoom values
page_scale_width=Bor wi Pot buk
page_scale_fit=Pot buk Romo
page_scale_auto=Dowogo ne matime pire kene
page_scale_actual=Kit Mamite

# Loading indicator messages
loading_error_indicator=Bal
loading_error=Bal otyeko time kun pango PDF.

# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type.alt=[{{type}} Lok angea manok]
request_password=I ung otyeko gwoko PDF:

18 changes: 18 additions & 0 deletions l10n/af/chrome.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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
unsupported_feature=Dié PDF-dokument sal dalk nie korrek vertoon word nie.
open_with_different_viewer=Open met 'n ander program
open_with_different_viewer.accessKey=O
140 changes: 140 additions & 0 deletions l10n/af/viewer.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# 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.

# Main toolbar buttons (tooltips and alt text for images)
previous.title=Vorige bladsy
previous_label=Vorige
next.title=Volgende bladsy
next_label=Volgende

# LOCALIZATION NOTE (page_label, page_of):
# These strings are concatenated to form the "Page: X of Y" string.
# Do not translate "{{pageCount}}", it will be substituted with a number
# representing the total number of pages.
page_label=Bladsy:
page_of=van {{pageCount}}

zoom_out.title=Zoem uit
zoom_out_label=Zoem uit
zoom_in.title=Zoem in
zoom_in_label=Zoem in
zoom.title=Zoem
presentation_mode.title=Wissel na voorleggingsmodus
presentation_mode_label=Voorleggingsmodus
open_file.title=Open lêer
open_file_label=Open
print.title=Druk
print_label=Druk
download.title=Laai af
download_label=Laai af
bookmark.title=Huidige aansig (kopieer of open in nuwe venster)
bookmark_label=Huidige aansig

# Secondary toolbar and context menu
tools.title=Nutsgoed
tools_label=Nutsgoed
first_page.title=Gaan na eerste bladsy
first_page.label=Gaan na eerste bladsy
first_page_label=Gaan na eerste bladsy
last_page.title=Gaan na laaste bladsy
last_page.label=Gaan na laaste bladsy
last_page_label=Gaan na laaste bladsy
page_rotate_cw.title=Roteer kloksgewys
page_rotate_cw.label=Roteer kloksgewys
page_rotate_cw_label=Roteer kloksgewys
page_rotate_ccw.title=Roteer anti-kloksgewys
page_rotate_ccw.label=Roteer anti-kloksgewys
page_rotate_ccw_label=Roteer anti-kloksgewys


# Document properties dialog box
document_properties_file_name=Lêernaam:
document_properties_title=Titel:

# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_sidebar.title=Sypaneel aan/af
toggle_sidebar_label=Sypaneel aan/af
outline.title=Wys dokumentoorsig
outline_label=Dokumentoorsig
thumbs.title=Wys duimnaels
thumbs_label=Duimnaels
findbar.title=Soek in dokument
findbar_label=Vind

# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=Bladsy {{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas=Duimnael van bladsy {{page}}

# Find panel button title and messages
find_label=Vind:
find_previous.title=Vind die vorige voorkoms van die frase
find_previous_label=Vorige
find_next.title=Vind die volgende voorkoms van die frase
find_next_label=Volgende
find_highlight=Verlig alle
find_match_case_label=Kassensitief
find_reached_top=Bokant van dokument is bereik; gaan voort van onder af
find_reached_bottom=Einde van dokument is bereik; gaan voort van bo af
find_not_found=Frase nie gevind nie

# Error panel labels
error_more_info=Meer inligting
error_less_info=Minder inligting
# 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}} (ID: {{build}})
# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
# english string describing the error.
error_message=Boodskap: {{message}}
# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
# trace.
error_stack=Stapel: {{stack}}
# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
error_file=Lêer: {{file}}
# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
error_line=Lyn: {{line}}
rendering_error='n Fout het voorgekom toe die bladsy weergegee is.

# Predefined zoom values
page_scale_width=Bladsywydte
page_scale_fit=Pas bladsy
page_scale_auto=Outomatiese zoem
page_scale_actual=Werklike grootte

# Loading indicator messages
loading_error_indicator=Fout
loading_error='n Fout het voorgekom met die laai van die PDF.
invalid_file_error=Ongeldige of korrupte PDF-lêer.
missing_file_error=PDF-lêer is weg.

# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type.alt=[{{type}}-annotasie
password_label=Gee die wagwoord om dié PDF-lêer mee te open.
password_invalid=Ongeldige wagwoord. Probeer gerus weer.
password_ok=OK
password_cancel=Kanselleer

printing_not_supported=Waarskuwing: Dié blaaier ondersteun nie drukwerk ten volle nie.
printing_not_ready=Waarskuwing: Die PDF is nog nie volledig gelaai vir drukwerk nie.
web_fonts_disabled=Webfonte is gedeaktiveer: kan nie PDF-fonte wat ingebed is, gebruik nie.
document_colors_disabled=PDF-dokumente word nie toegelaat om hul eie kleure te gebruik nie: 'Laat bladsye toe om hul eie kleure te kies' is gedeaktiveer in die blaaier.
18 changes: 18 additions & 0 deletions l10n/ak/chrome.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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
unsupported_feature=Ɛbɛtumi aba no sɛ PDF dɔkomɛnte yi remmba papa wɔ kɔmputa no so.
open_with_different_viewer=Fa hwɛfo foforo bue
open_with_different_viewer.accessKey=o
Loading