Use gettext .po files for translations
This allows the same workflow as most other projects for translations.
This commit is contained in:
29
po/Makefile
Normal file
29
po/Makefile
Normal file
@@ -0,0 +1,29 @@
|
||||
all:
|
||||
.PHONY: update-po update-js update-pot
|
||||
|
||||
LINGUAS := de el nl sv
|
||||
|
||||
VERSION := $(shell grep '"version"' ../package.json | cut -d '"' -f 4)
|
||||
|
||||
POFILES := $(addsuffix .po,$(LINGUAS))
|
||||
JSFILES := $(addprefix ../app/locale/,$(addsuffix .js,$(LINGUAS)))
|
||||
|
||||
update-po: $(POFILES)
|
||||
update-js: $(JSFILES)
|
||||
|
||||
%.po: noVNC.pot
|
||||
msgmerge --update --lang=$* $@ $<
|
||||
../app/locale/%.js: %.po
|
||||
./po2js $< $@
|
||||
|
||||
update-pot:
|
||||
xgettext --output=noVNC.pot \
|
||||
--copyright-holder="Various Authors" \
|
||||
--package-name="noVNC" \
|
||||
--package-version="$(VERSION)" \
|
||||
--msgid-bugs-address="novnc@googlegroups.com" \
|
||||
--add-comments=TRANSLATORS: \
|
||||
--sort-by-file \
|
||||
../app/*.js \
|
||||
../core/*.js \
|
||||
../core/input/*.js
|
||||
58
po/de.po
Normal file
58
po/de.po
Normal file
@@ -0,0 +1,58 @@
|
||||
# German translations for noVNC package
|
||||
# German translation for noVNC.
|
||||
# Copyright (C) 2016 Various Authors
|
||||
# This file is distributed under the same license as the noVNC package.
|
||||
# Loek Janssen <loekjanssen@gmail.com>, 2016.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: noVNC 0.6.1\n"
|
||||
"Report-Msgid-Bugs-To: novnc@googlegroups.com\n"
|
||||
"POT-Creation-Date: 2016-11-15 08:11+0100\n"
|
||||
"PO-Revision-Date: 2016-11-15 07:51+0100\n"
|
||||
"Last-Translator: Loek Janssen <loekjanssen@gmail.com>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: de\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: ../app/ui.js:402
|
||||
msgid "Connecting..."
|
||||
msgstr "Verbunden..."
|
||||
|
||||
#: ../app/ui.js:409
|
||||
msgid "Connected (encrypted) to "
|
||||
msgstr "Verbunden mit (verschlüsselt) "
|
||||
|
||||
#: ../app/ui.js:411
|
||||
msgid "Connected (unencrypted) to "
|
||||
msgstr "Verbunden mit (unverschlüsselt) "
|
||||
|
||||
#: ../app/ui.js:416
|
||||
msgid "Disconnecting..."
|
||||
msgstr "Verbindung trennen..."
|
||||
|
||||
#: ../app/ui.js:421
|
||||
msgid "Disconnected"
|
||||
msgstr "Verbindung zum Server getrennt"
|
||||
|
||||
#: ../app/ui.js:1006 ../core/rfb.js:278
|
||||
msgid "Must set host and port"
|
||||
msgstr "Richten Sie Host und Port ein"
|
||||
|
||||
#: ../app/ui.js:1059
|
||||
msgid "Password is required"
|
||||
msgstr "Passwort ist erforderlich"
|
||||
|
||||
#: ../app/ui.js:1272
|
||||
msgid ""
|
||||
"Forcing clipping mode since scrollbars aren't supported by IE in fullscreen"
|
||||
msgstr ""
|
||||
"'Clipping-Modus' aktiviert, Scrollbalken in 'IE-Vollbildmodus' werden nicht "
|
||||
"unterstützt"
|
||||
|
||||
#: ../core/rfb.js:556
|
||||
msgid "Disconnect timeout"
|
||||
msgstr "Timeout beim trennen"
|
||||
57
po/el.po
Normal file
57
po/el.po
Normal file
@@ -0,0 +1,57 @@
|
||||
# Greek translations for noVNC package.
|
||||
# Copyright (C) 2016 Various Authors
|
||||
# This file is distributed under the same license as the noVNC package.
|
||||
# Giannis Kosmas <kosmasgiannis@gmail.com>, 2016.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: noVNC 0.6.1\n"
|
||||
"Report-Msgid-Bugs-To: novnc@googlegroups.com\n"
|
||||
"POT-Creation-Date: 2016-11-15 08:11+0100\n"
|
||||
"PO-Revision-Date: 2016-11-15 07:51+0100\n"
|
||||
"Last-Translator: Giannis Kosmas <kosmasgiannis@gmail.com>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: el\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: ../app/ui.js:402
|
||||
msgid "Connecting..."
|
||||
msgstr "Συνδέεται..."
|
||||
|
||||
#: ../app/ui.js:409
|
||||
msgid "Connected (encrypted) to "
|
||||
msgstr "Συνδέθηκε (κρυπτογραφημένα) με το "
|
||||
|
||||
#: ../app/ui.js:411
|
||||
msgid "Connected (unencrypted) to "
|
||||
msgstr "Συνδέθηκε (μη κρυπτογραφημένα) με το "
|
||||
|
||||
#: ../app/ui.js:416
|
||||
msgid "Disconnecting..."
|
||||
msgstr "Aποσυνδέεται..."
|
||||
|
||||
#: ../app/ui.js:421
|
||||
msgid "Disconnected"
|
||||
msgstr "Αποσυνδέθηκε"
|
||||
|
||||
#: ../app/ui.js:1006 ../core/rfb.js:278
|
||||
msgid "Must set host and port"
|
||||
msgstr "Πρέπει να οριστεί το όνομα και η πόρτα του διακομιστή"
|
||||
|
||||
#: ../app/ui.js:1059
|
||||
msgid "Password is required"
|
||||
msgstr "Απαιτείται ο κωδικός"
|
||||
|
||||
#: ../app/ui.js:1272
|
||||
msgid ""
|
||||
"Forcing clipping mode since scrollbars aren't supported by IE in fullscreen"
|
||||
msgstr ""
|
||||
"Εφαρμογή λειτουργίας αποκοπής αφού δεν υποστηρίζονται οι λωρίδες κύλισης σε "
|
||||
"πλήρη οθόνη στον IE"
|
||||
|
||||
#: ../core/rfb.js:556
|
||||
msgid "Disconnect timeout"
|
||||
msgstr "Παρέλευση χρονικού ορίου αποσύνδεσης"
|
||||
58
po/nl.po
Normal file
58
po/nl.po
Normal file
@@ -0,0 +1,58 @@
|
||||
# Dutch translations for noVNC package
|
||||
# Nederlandse vertalingen voor het pakket noVNC.
|
||||
# Copyright (C) 2016 Various Authors
|
||||
# This file is distributed under the same license as the noVNC package.
|
||||
# Loek Janssen <loekjanssen@gmail.com>, 2016.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: noVNC 0.6.1\n"
|
||||
"Report-Msgid-Bugs-To: novnc@googlegroups.com\n"
|
||||
"POT-Creation-Date: 2016-11-15 08:11+0100\n"
|
||||
"PO-Revision-Date: 2016-11-15 07:51+0100\n"
|
||||
"Last-Translator: Loek Janssen <loekjanssen@gmail.com>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: nl\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: ../app/ui.js:402
|
||||
msgid "Connecting..."
|
||||
msgstr "Verbinden..."
|
||||
|
||||
#: ../app/ui.js:409
|
||||
msgid "Connected (encrypted) to "
|
||||
msgstr "Verbonden (versleuteld) met "
|
||||
|
||||
#: ../app/ui.js:411
|
||||
msgid "Connected (unencrypted) to "
|
||||
msgstr "Verbonden (onversleuteld) met "
|
||||
|
||||
#: ../app/ui.js:416
|
||||
msgid "Disconnecting..."
|
||||
msgstr "Verbinding verbreken..."
|
||||
|
||||
#: ../app/ui.js:421
|
||||
msgid "Disconnected"
|
||||
msgstr "Verbinding verbroken"
|
||||
|
||||
#: ../app/ui.js:1006 ../core/rfb.js:278
|
||||
msgid "Must set host and port"
|
||||
msgstr "Host en poort moeten worden ingesteld"
|
||||
|
||||
#: ../app/ui.js:1059
|
||||
msgid "Password is required"
|
||||
msgstr "Wachtwoord is vereist"
|
||||
|
||||
#: ../app/ui.js:1272
|
||||
msgid ""
|
||||
"Forcing clipping mode since scrollbars aren't supported by IE in fullscreen"
|
||||
msgstr ""
|
||||
"''Clipping mode' ingeschakeld, omdat schuifbalken in volledige-scherm-modus "
|
||||
"in IE niet worden ondersteund"
|
||||
|
||||
#: ../core/rfb.js:556
|
||||
msgid "Disconnect timeout"
|
||||
msgstr "Timeout tijdens verbreken van verbinding"
|
||||
55
po/noVNC.pot
Normal file
55
po/noVNC.pot
Normal file
@@ -0,0 +1,55 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR Various Authors
|
||||
# This file is distributed under the same license as the noVNC package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: noVNC 0.6.1\n"
|
||||
"Report-Msgid-Bugs-To: novnc@googlegroups.com\n"
|
||||
"POT-Creation-Date: 2016-11-15 08:11+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../app/ui.js:402
|
||||
msgid "Connecting..."
|
||||
msgstr ""
|
||||
|
||||
#: ../app/ui.js:409
|
||||
msgid "Connected (encrypted) to "
|
||||
msgstr ""
|
||||
|
||||
#: ../app/ui.js:411
|
||||
msgid "Connected (unencrypted) to "
|
||||
msgstr ""
|
||||
|
||||
#: ../app/ui.js:416
|
||||
msgid "Disconnecting..."
|
||||
msgstr ""
|
||||
|
||||
#: ../app/ui.js:421
|
||||
msgid "Disconnected"
|
||||
msgstr ""
|
||||
|
||||
#: ../app/ui.js:1006 ../core/rfb.js:278
|
||||
msgid "Must set host and port"
|
||||
msgstr ""
|
||||
|
||||
#: ../app/ui.js:1059
|
||||
msgid "Password is required"
|
||||
msgstr ""
|
||||
|
||||
#: ../app/ui.js:1272
|
||||
msgid ""
|
||||
"Forcing clipping mode since scrollbars aren't supported by IE in fullscreen"
|
||||
msgstr ""
|
||||
|
||||
#: ../core/rfb.js:556
|
||||
msgid "Disconnect timeout"
|
||||
msgstr ""
|
||||
56
po/po2js
Executable file
56
po/po2js
Executable file
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env node
|
||||
/*
|
||||
* ps2js: gettext .po to noVNC .js converter
|
||||
* Copyright (C) 2016 Pierre Ossman
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
var getopt = require('node-getopt');
|
||||
var fs = require('fs');
|
||||
var po2json = require("po2json");
|
||||
|
||||
opt = getopt.create([
|
||||
['h' , 'help' , 'display this help'],
|
||||
]).bindHelp().parseSystem();
|
||||
|
||||
if (opt.argv.length != 2) {
|
||||
console.error("Incorrect number of arguments given");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
var data = po2json.parseFileSync(opt.argv[0]);
|
||||
|
||||
var output =
|
||||
"/*\n" +
|
||||
" * Translations for " + data[""]["language"] + "\n" +
|
||||
" *\n" +
|
||||
" * This file was autotomatically generated from " + opt.argv[0] + "\n" +
|
||||
" * DO NOT EDIT!\n" +
|
||||
" */\n" +
|
||||
"\n" +
|
||||
"Language = {\n";
|
||||
|
||||
for (msgid in data) {
|
||||
if (msgid === "")
|
||||
continue;
|
||||
|
||||
msgstr = data[msgid][1];
|
||||
output += " " + JSON.stringify(msgid) + ": " +
|
||||
JSON.stringify(msgstr) + ",\n";
|
||||
}
|
||||
|
||||
output += "};\n";
|
||||
|
||||
fs.writeFileSync(opt.argv[1], output);
|
||||
57
po/sv.po
Normal file
57
po/sv.po
Normal file
@@ -0,0 +1,57 @@
|
||||
# Swedish translations for noVNC package
|
||||
# Svenska översättningar för paket noVNC.
|
||||
# Copyright (C) 2016 Various Authors
|
||||
# This file is distributed under the same license as the noVNC package.
|
||||
# Samuel Mannehed <samuel@cendio.se>, 2016.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: noVNC 0.6.1\n"
|
||||
"Report-Msgid-Bugs-To: novnc@googlegroups.com\n"
|
||||
"POT-Creation-Date: 2016-11-15 08:11+0100\n"
|
||||
"PO-Revision-Date: 2016-11-15 07:51+0100\n"
|
||||
"Last-Translator: Samuel Mannehed <samuel@cendio.se>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: sv\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: ../app/ui.js:402
|
||||
msgid "Connecting..."
|
||||
msgstr "Ansluter..."
|
||||
|
||||
#: ../app/ui.js:409
|
||||
msgid "Connected (encrypted) to "
|
||||
msgstr "Ansluten (krypterat) till "
|
||||
|
||||
#: ../app/ui.js:411
|
||||
msgid "Connected (unencrypted) to "
|
||||
msgstr "Ansluten (okrypterat) till "
|
||||
|
||||
#: ../app/ui.js:416
|
||||
msgid "Disconnecting..."
|
||||
msgstr "Kopplar ner..."
|
||||
|
||||
#: ../app/ui.js:421
|
||||
msgid "Disconnected"
|
||||
msgstr "Frånkopplad"
|
||||
|
||||
#: ../app/ui.js:1006 ../core/rfb.js:278
|
||||
msgid "Must set host and port"
|
||||
msgstr "Du måste specifiera en host och port"
|
||||
|
||||
#: ../app/ui.js:1059
|
||||
msgid "Password is required"
|
||||
msgstr "Lösenord krävs"
|
||||
|
||||
#: ../app/ui.js:1272
|
||||
msgid ""
|
||||
"Forcing clipping mode since scrollbars aren't supported by IE in fullscreen"
|
||||
msgstr ""
|
||||
"Tvingar 'Clipping mode' eftersom skrollning inte stödjs av IE i fullskärm"
|
||||
|
||||
#: ../core/rfb.js:556
|
||||
msgid "Disconnect timeout"
|
||||
msgstr "Det tog för lång tid att koppla ner"
|
||||
Reference in New Issue
Block a user