Better automatic translation update

This commit is contained in:
Jakob Borg 2014-07-30 11:52:16 +02:00
parent 8bfe4374de
commit f4d1632506
9 changed files with 249 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -104,8 +104,9 @@ xdr() {
transifex() { transifex() {
pushd gui pushd gui
go run ../cmd/transifexdl/main.go go run ../cmd/transifexdl/main.go > valid-langs.js
popd popd
assets
} }
case "$1" in case "$1" in

View File

@ -2,6 +2,7 @@ package main
import ( import (
"encoding/json" "encoding/json"
"fmt"
"log" "log"
"net/http" "net/http"
"os" "os"
@ -66,6 +67,7 @@ func main() {
} }
sort.Strings(langs) sort.Strings(langs)
fmt.Print("var validLangs = ")
json.NewEncoder(os.Stdout).Encode(langs) json.NewEncoder(os.Stdout).Encode(langs)
} }

View File

@ -9,7 +9,6 @@
var syncthing = angular.module('syncthing', ['pascalprecht.translate']); var syncthing = angular.module('syncthing', ['pascalprecht.translate']);
var urlbase = 'rest'; var urlbase = 'rest';
var validLangs = ["de","en","es","fr","pt","sv"];
syncthing.config(function ($httpProvider, $translateProvider) { syncthing.config(function ($httpProvider, $translateProvider) {
$httpProvider.defaults.xsrfHeaderName = 'X-CSRF-Token'; $httpProvider.defaults.xsrfHeaderName = 'X-CSRF-Token';

View File

@ -752,6 +752,7 @@
<script src="angular-translate-loader.min.js"></script> <script src="angular-translate-loader.min.js"></script>
<script src="jquery-2.0.3.min.js"></script> <script src="jquery-2.0.3.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script> <script src="bootstrap/js/bootstrap.min.js"></script>
<script src="valid-langs.js"></script>
<script src="app.js"></script> <script src="app.js"></script>
</body> </body>
</html> </html>

View File

@ -40,7 +40,7 @@
"Local Discovery": "Lokale Auffindung", "Local Discovery": "Lokale Auffindung",
"Local Discovery Port": "Lokaler Aufindungsport", "Local Discovery Port": "Lokaler Aufindungsport",
"Local Repository": "Lokales Verzeichnis", "Local Repository": "Lokales Verzeichnis",
"Master Repo": "Veränderungen zugelassen", "Master Repo": "Keine Veränderungen zugelassen",
"Max File Change Rate (KiB/s)": "Maximale Datenänderungsrate (KiB/s)", "Max File Change Rate (KiB/s)": "Maximale Datenänderungsrate (KiB/s)",
"Max Outstanding Requests": "Max. ausstehende Anfragen", "Max Outstanding Requests": "Max. ausstehende Anfragen",
"No": "Nein", "No": "Nein",

112
gui/lang-it.json Normal file
View File

@ -0,0 +1,112 @@
{
"API Key": "Chiave API",
"About": "Informazioni",
"Add Node": "Aggiungi Nodo",
"Add Repository": "Aggiungi Deposito",
"Address": "Indirizzo",
"Addresses": "Indirizzi",
"Allow Anonymous Usage Reporting?": "Abilitare Statistiche Anonime di Utilizzo?",
"Announce Server": "Server di Ricerca Globale dei Nodi",
"Anonymous Usage Reporting": "Statistiche Anonime di Utilizzo",
"Bugs": "Bug",
"CPU Utilization": "Utilizzo della CPU",
"Close": "Chiudi",
"Copyright © 2014 Jakob Borg and the following Contributors:": "Copyright © 2014 Jakob Borg e i seguenti Collaboratori:",
"Delete": "Elimina",
"Disconnected": "Disconnesso",
"Documentation": "Documentazione",
"Download Rate": "Velocità Download",
"Edit": "Modifica",
"Edit Node": "Modifica Nodo",
"Edit Repository": "Modifica Deposito",
"Enable UPnP": "Attiva UPnP",
"Enter comma separated \"ip:port\" addresses or \"dynamic\" to perform automatic discovery of the address.": "Inserisci gli indirizzi \"ip:porta\" separati da una virgola, altrimenti inserisci \"dynamic\" per effettuare il rilevamento automatico dell'indirizzo.",
"Error": "Errore",
"File Versioning": "Controllo Versione dei File",
"File permission bits are ignored when looking for changes. Use on FAT filesystems.": "Il software evita i bit dei permessi dei file durante il controllo delle modifiche. Utilizzato nei filesystem FAT.",
"Files are moved to date stamped versions in a .stversions folder when replaced or deleted by syncthing.": "I file sostituiti o eliminati da syncthing vengono datati e spostati in una cartella .stversions .",
"Files are protected from changes made on other nodes, but changes made on this node will be sent to the rest of the cluster.": "I file sono protetti dalle modifiche effettuate negli altri nodi, ma le modifiche effettuate in questo nodo verranno inviate anche al resto del cluster.",
"Folder": "Cartella",
"GUI Authentication Password": "Password di Autenticazione dell'Utente",
"GUI Authentication User": "Utente dell'Interfaccia Grafica",
"GUI Listen Addresses": "Indirizzi dell'Interfaccia Grafica",
"Generate": "Genera",
"Global Discovery": "Individuazione Globale",
"Global Repository": "Deposito Globale",
"Idle": "Inattivo",
"Ignore Permissions": "Ignora Permessi",
"Keep Versions": "Mantieni le Versioni",
"Latest Release": "Ultimo Rilascio",
"Local Discovery": "Individuazione Locale",
"Local Discovery Port": "Porta di Individuazione Locale",
"Local Repository": "Deposito Locale",
"Master Repo": "Deposito Principale",
"Max File Change Rate (KiB/s)": "Tasso Massimo di Cambiamento dei File (KiB/s)",
"Max Outstanding Requests": "Numero Massimo di Richieste Simultanee per i Blocchi di File",
"No": "No",
"Node ID": "ID Nodo",
"Node Name": "Nome Nodo",
"Notice": "Avviso",
"OK": "OK",
"Offline": "Non in linea",
"Online": "In linea",
"Out Of Sync": "Non Sincronizzati",
"Outgoing Rate Limit (KiB/s)": "Limite di Velocità in Uscita (KiB/s)",
"Override Changes": "Ignora Modifiche",
"Path to the repository on the local computer. Will be created if it does not exist. The tilde character (~) can be used as a shortcut for": "Percorso del deposito nel computer locale. Verrà creato se non esiste già. Il carattere tilde (~) può essere utilizzato come scorciatoia per",
"Please wait": "Attendere prego",
"Preview Usage Report": "Anteprima Statistiche di Utilizzo",
"RAM Utilization": "Utilizzo della RAM",
"Reconnect Interval (s)": "Intervallo di Riconnessione (s)",
"Repository ID": "ID Deposito",
"Repository Master": "Deposito Principale",
"Repository Path": "Percorso del Deposito",
"Rescan Interval (s)": "Intervallo di Scansione dei File (s)",
"Restart": "Riavvia",
"Restart Needed": "Riavvio Necessario",
"Save": "Salva",
"Scanning": "Scansione in corso",
"Select the nodes to share this repository with.": "Seleziona i nodi con i quali vuoi condividere questo deposito.",
"Settings": "Impostazioni",
"Share With Nodes": "Condividi Con i Nodi",
"Shared With": "Condiviso Con",
"Short identifier for the repository. Must be the same on all cluster nodes.": "Breve identificatore del deposito. Deve essere lo stesso su tutti i nodi del cluster.",
"Show ID": "Mostra ID",
"Shown instead of Node ID in the cluster status.": "Visibile al posto dell'ID Nodo nello stato del cluster.",
"Shutdown": "Arresta",
"Source Code": "Codice Sorgente",
"Start Browser": "Avvia Browser",
"Stopped": "Fermato",
"Support / Forum": "Supporto / Forum",
"Sync Protocol Listen Addresses": "Indirizzi del Protocollo di Sincronizzazione",
"Synchronization": "Sincronizzazione",
"Syncing": "Sincronizzazione in corso",
"Syncthing has been shut down.": "Syncthing è stato arrestato.",
"Syncthing includes the following software or portions thereof:": "Syncthing include i seguenti software o porzioni di questi:",
"Syncthing seems to be down, or there is a problem with your Internet connection. Retrying…": "Syncthing sembra inattivo, oppure c'è un problema con la tua connessione a Internet. Nuovo tentativo…",
"The aggregated statistics are publicly available at {{url}}": "Le statistiche aggregate sono disponibili pubblicamente su {{url}}",
"The configuration has been saved but not activated. Syncthing must restart to activate the new configuration.": "La configurazione è stata salvata ma non attivata. Devi riavviare Syncthing per attivare la nuova configurazione.",
"The encrypted usage report is sent daily. It is used to track common platforms, repo sizes and app versions. If the reported data set is changed you will be prompted with this dialog again.": "Quotidianamente il software invia le statistiche di utilizzo in forma criptata. Questi dati riguardano i sistemi operativi utilizzati, le dimensioni dei depositi e le versioni del software. Se i dati riportati cambiano verrà mostrata di nuovo questa finestra di dialogo.",
"The entered node ID does not look valid. It should be a 52 character string consisting of letters and numbers, with spaces and dashes being optional.": "L'ID del nodo inserito non sembra valido. Dovrebbe essere una stringa di 52 caratteri costituita da lettere e numeri, con spazi e trattini opzionali.",
"The node ID cannot be blank.": "L'ID del nodo non può essere vuoto.",
"The node ID to enter here can be found in the \"Edit > Show ID\" dialog on the other node. Spaces and dashes are optional (ignored).": "Trova l'ID del nodo nella finestra di dialogo \"Modifica > Mostra ID\" dell'altro nodo e poi inseriscilo qui. Gli spazi e i trattini sono opzionali (ignorati).",
"The number of old versions to keep, per file.": "Il numero di vecchie versioni da mantenere, per file.",
"The number of versions must be a number and cannot be blank.": "Il numero di versioni dev'essere un numero e non può essere vuoto.",
"The repository ID cannot be blank.": "L'ID del deposito non può essere vuoto.",
"The repository ID must be a short identifier (64 characters or less) consisting of letters, numbers and the the dot (.), dash (-) and underscode (_) characters only.": "L'ID del deposito dev'essere un identificatore breve (64 caratteri o meno) costituito solamente da lettere, numeri, punti (.), trattini (-) e trattini bassi (_).",
"The repository ID must be unique.": "L'ID del deposito dev'essere unico.",
"The repository path cannot be blank.": "Il percorso del deposito non può essere vuoto.",
"Unknown": "Sconosciuto",
"Up to Date": "Sincronizzato",
"Upgrade To {%version%}": "Aggiorna Alla {{version}}",
"Upload Rate": "Velocità Upload",
"Usage": "Utilizzo",
"Use Compression": "Utilizza Compressione",
"Use HTTPS for GUI": "Utilizza HTTPS per l'interfaccia grafica",
"Version": "Versione",
"When adding a new node, keep in mind that this node must be added on the other side too.": "Quando aggiungi un nuovo nodo, ricordati di aggiungerlo anche dall'altro lato.",
"When adding a new repository, keep in mind that the Repository ID is used to tie repositories together between nodes. They are case sensitive and must match exactly between all nodes.": "Quando aggiungi un nuovo deposito ricordati che gli ID vengono utilizzati per collegare i depositi nei nodi. Distinguono maiuscole e minuscole e devono corrispondere esattamente su tutti i nodi.",
"Yes": "Sì",
"You must keep at least one version.": "È necessario mantenere almeno una versione.",
"items": "elementi"
}

112
gui/lang-ru.json Normal file
View File

@ -0,0 +1,112 @@
{
"API Key": "Ключ API",
"About": "О программе",
"Add Node": "Добавить Узел",
"Add Repository": "Добавить репозиторий",
"Address": "Адрес",
"Addresses": "Адреса",
"Allow Anonymous Usage Reporting?": "Разрешить сбор анонимной статистики использования?",
"Announce Server": "Сервер публикации",
"Anonymous Usage Reporting": "Анонимная статистика использования",
"Bugs": "Ошибки",
"CPU Utilization": "Загрузка ЦПУ",
"Close": "Закрыть",
"Copyright © 2014 Jakob Borg and the following Contributors:": "Все права защищены © 2014 Jakob Borg и следующие участники:",
"Delete": "Удалить",
"Disconnected": "Оффлайн",
"Documentation": "Документация",
"Download Rate": "Скорость загрузки",
"Edit": "Изменить",
"Edit Node": "Изменить Узел",
"Edit Repository": "Изменить Репозиторий",
"Enable UPnP": "Включить UPnP",
"Enter comma separated \"ip:port\" addresses or \"dynamic\" to perform automatic discovery of the address.": " Введите пары \"IP:PORT\" разделённые запятыми, или слово \"dynamic\" для автоматического обнаружения адреса.",
"Error": "Ошибка",
"File Versioning": "Управление версиями",
"File permission bits are ignored when looking for changes. Use on FAT filesystems.": "Права доступа к файлам будут игнорироваться. Используйте не файловых системах типа FAT.",
"Files are moved to date stamped versions in a .stversions folder when replaced or deleted by syncthing.": "Версии файлов на момент изменения будут перемещены в директорию .stversions когда они удалены или перемещены в процессе синхронизации.",
"Files are protected from changes made on other nodes, but changes made on this node will be sent to the rest of the cluster.": "Файлы защищены от изменений сторонними узалми, но изменения внесённые текущим узлом будут синхронизированы со всем кластером.",
"Folder": "Папка",
"GUI Authentication Password": "Пароль для доступа к панели управления",
"GUI Authentication User": "Имя пользователя для доступа к панели управления",
"GUI Listen Addresses": "Адрес панели управления",
"Generate": "Сгенерировать",
"Global Discovery": "Глобальное обнаружение",
"Global Repository": "Глобальный репозиторий",
"Idle": "Бездействует",
"Ignore Permissions": "Игнорировать файловые права доступа",
"Keep Versions": "Количество хранимых версий",
"Latest Release": "Последняя версия",
"Local Discovery": "Локальное обнаружение",
"Local Discovery Port": "Порт локального обнаружения",
"Local Repository": "Локальный репозиторий",
"Master Repo": "Главный репозиторий",
"Max File Change Rate (KiB/s)": "Максимальная скорость изменения файлов (KiB/s)",
"Max Outstanding Requests": "Максимальное количество исходящих запросов",
"No": "Нет",
"Node ID": "ID Узла",
"Node Name": "Имя Узла",
"Notice": "Внимание",
"OK": "ОК",
"Offline": "Оффлайн",
"Online": "Онлайн",
"Out Of Sync": "Не синхронизировано",
"Outgoing Rate Limit (KiB/s)": "Предел скорости отдачи (KiB/s)",
"Override Changes": "Перезаписать изменения",
"Path to the repository on the local computer. Will be created if it does not exist. The tilde character (~) can be used as a shortcut for": "Путь к репозиторию на локальном компьютере. Если не существует, то будет создан. Знак тильды (~) может использоваться как",
"Please wait": "Пожалуйста, подождите",
"Preview Usage Report": "Посмотреть отчёт об использовании",
"RAM Utilization": "Использование ОЗУ",
"Reconnect Interval (s)": "Интервал переподключений (секунды)",
"Repository ID": "ID Репозитория",
"Repository Master": "Главный Репозиторий",
"Repository Path": "Путь к Репозиторию",
"Rescan Interval (s)": "Интервал между сканированием (сек)",
"Restart": "Перезапуск",
"Restart Needed": "Требуется перезапуск",
"Save": "Сохранить",
"Scanning": "Сканирование",
"Select the nodes to share this repository with.": "Выберите узлы для которых будет доступен данный репозиторий.",
"Settings": "Настройки",
"Share With Nodes": "Предоставить доступ узлам",
"Shared With": "Доступ предоставлен",
"Short identifier for the repository. Must be the same on all cluster nodes.": "Короткий идентификатор репозитория. Должен быть одинаковый на всех узлах кластера.",
"Show ID": "Показать ID",
"Shown instead of Node ID in the cluster status.": "Отображается вместо ID узла в статусе кластера.",
"Shutdown": "Выключение",
"Source Code": "Исходный код",
"Start Browser": "Открыть браузер",
"Stopped": "Остановлено",
"Support / Forum": "Поддержка / Форум",
"Sync Protocol Listen Addresses": "Адрес протокола синхронизации",
"Synchronization": "Синхронизация",
"Syncing": "Синхронизация",
"Syncthing has been shut down.": "Syncthing выключен.",
"Syncthing includes the following software or portions thereof:": "Syncthing включает в себя следующее ПО или его части:",
"Syncthing seems to be down, or there is a problem with your Internet connection. Retrying…": "Кажется, Syncthing не запущен или есть проблемы с подключением к Интернету. Переподключаюсь...",
"The aggregated statistics are publicly available at {{url}}": "Суммарная статистика общедоступна на {{url}}",
"The configuration has been saved but not activated. Syncthing must restart to activate the new configuration.": "Конфигурация была сохранена ноне активирована. Для активации новой конфигурации необходимо рестартовать Syncthing.",
"The encrypted usage report is sent daily. It is used to track common platforms, repo sizes and app versions. If the reported data set is changed you will be prompted with this dialog again.": "Зашифрованные отчёты об использовании отправляются ежедневно. Они используются для отслеживания проблем, размеров репозиториев и версий Syncthing. Если набор данных в отчёте будет изменён, то вы получите уведомление об этом в этом диалоге.",
"The entered node ID does not look valid. It should be a 52 character string consisting of letters and numbers, with spaces and dashes being optional.": "Введённый ID узла выглядит неправильно: ID должен быть строкой, длинной 52 символа, обязательно содержащей группы букв и цифр которые могут быть разделены пробелами или тире.",
"The node ID cannot be blank.": "ID узла не может быть пустым.",
"The node ID to enter here can be found in the \"Edit > Show ID\" dialog on the other node. Spaces and dashes are optional (ignored).": "ID узла можно узнать в окне \"Редактировать > Показать ID\" на требуемом узле. Пробелы и тире используются для удобства и не обязательны (игнорируются).",
"The number of old versions to keep, per file.": "Количество хранимых версий файла.",
"The number of versions must be a number and cannot be blank.": "Количество версий должно быть числом и не может быть пустым.",
"The repository ID cannot be blank.": "ID Репозитория не может быть пустым.",
"The repository ID must be a short identifier (64 characters or less) consisting of letters, numbers and the the dot (.), dash (-) and underscode (_) characters only.": "ID репозитория должен быть коротким id (64 символа или меньше) состоящий только из букв, цифр, точек (.), тире (-) и нижнего подчёркивания (_).",
"The repository ID must be unique.": "ID Репозитория должен быть уникальным.",
"The repository path cannot be blank.": "Путь к репозиторию не может быть пустым.",
"Unknown": "Неизвестно",
"Up to Date": "Обновлено",
"Upgrade To {%version%}": "Обновить до {{version}}",
"Upload Rate": "Скорость отдачи",
"Usage": "Справка",
"Use Compression": "Использовать сжатие",
"Use HTTPS for GUI": "Использовать HTTPS для панели управления",
"Version": "Версия",
"When adding a new node, keep in mind that this node must be added on the other side too.": "Добавляя новый узел помните, что новый узел должен быть добавлен и на другой стороне.",
"When adding a new repository, keep in mind that the Repository ID is used to tie repositories together between nodes. They are case sensitive and must match exactly between all nodes.": "Добавляя новый репозиторий помните, что ID репозитория используется для связи всех репозиториев между узлами. ID чувствительны к регистру и должны совпадать на всех узлах.",
"Yes": "Да",
"You must keep at least one version.": "Вы должны сохранить как минимум одну версию.",
"items": "элементы"
}

1
gui/valid-langs.js Normal file
View File

@ -0,0 +1 @@
var validLangs = ["de","en","es","fr","it","pt","ru","sv"]