Minify translations downloaded from Lokalise (#611)

This commit is contained in:
Adam Mills 2017-11-11 15:33:47 -05:00 committed by GitHub
parent adac8e55d7
commit 508b5d6d77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
44 changed files with 108 additions and 253 deletions

View File

@ -0,0 +1,15 @@
const gulp = require('gulp');
const minify = require('gulp-jsonminify');
const rename = require('gulp-rename');
const streamify = require('gulp-streamify');
const zip = require('gulp-vinyl-zip');
function translationsExtract() {
return zip.src('build-temp/Home_Assistant_-_Polymer_frontend-locale.zip')
.pipe(rename({
dirname: '',
}))
.pipe(streamify(minify()))
.pipe(gulp.dest('translations'));
}
gulp.task('translations-extract', translationsExtract.bind(null));

View File

@ -50,8 +50,10 @@
"gulp-merge-json": "^1.0.0",
"gulp-rename": "^1.2.2",
"gulp-rollup-each": "^2.0.0",
"gulp-streamify": "^1.0.2",
"gulp-uglify": "^3.0.0",
"gulp-util": "^3.0.8",
"gulp-vinyl-zip": "^2.1.0",
"home-assistant-js-websocket": "^1.1.2",
"html-minifier": "^3.5.6",
"merge-stream": "^1.0.1",

View File

@ -21,11 +21,9 @@ fi
[ -z "${LOKALISE_TOKEN-}" ] && LOKALISE_TOKEN="$(<.lokalise_token)"
PROJECT_ID="3420425759f6d6d241f598.13594006"
LOCAL_DIR="$(pwd)/translations"
DOWNLOAD_FILE="${LOCAL_DIR}/Home_Assistant_-_Polymer_frontend-locale.zip"
LOCAL_DIR="$(pwd)/build-temp"
FILE_FORMAT=json
rm -f ${LOCAL_DIR}/*.json
mkdir -p ${LOCAL_DIR}
docker run \
@ -37,6 +35,5 @@ docker run \
--type json \
--dest /opt/dest
# Extract and delete downloaded zip bundle
unzip -j "${DOWNLOAD_FILE}" locale/* -d "${LOCAL_DIR}"
rm -f "${DOWNLOAD_FILE}"
# Extract and and minify the downloaded translations
./node_modules/.bin/gulp translations-extract

1
translations/ar.json Normal file
View File

@ -0,0 +1 @@
{"panel":{"config":"الإعدادات","states":"نظرة عامة","map":"خريطة","logbook":"سجل","history":"التاريخ","log_out":"تسجيل الخروج","mailbox":"علبة البريد","shopping_list":"قائمة التسوق"}}

View File

@ -1,9 +1 @@
{
"panel": {
"states": "Състояние",
"map": "Карта",
"logbook": "Дневник",
"history": "История",
"log_out": "Излез"
}
}
{"panel":{"config":"Конфигурация","states":"Състояние","map":"Карта","logbook":"Дневник","history":"История","log_out":"Излез","mailbox":"Пощенска кутия","shopping_list":"Списък за пазаруване"}}

1
translations/ca.json Normal file
View File

@ -0,0 +1 @@
{"panel":{"config":"Configuració","states":"Visió general","map":"Mapa","logbook":"Diari de registre","history":"Historial","log_out":"Desconnectar","mailbox":"Bústia","shopping_list":"Llista de compres"}}

View File

@ -1,10 +1 @@
{
"panel": {
"config": "Nastavení",
"states": "Stavy",
"map": "Mapa",
"logbook": "Deník",
"history": "Historie",
"log_out": "Odhlásit se"
}
}
{"panel":{"config":"Nastavení","states":"Přehled","map":"Mapa","logbook":"Záznamy","history":"Historie","log_out":"Odhlásit se","mailbox":"Schránka","shopping_list":"Nákupní seznam"}}

View File

@ -1,11 +1 @@
{
"panel": {
"config": "Indstillinger",
"states": "Oversigt",
"map": "Kort",
"logbook": "Logbog",
"history": "Historik",
"log_out": "Log af",
"shopping_list": "Indkøbsliste"
}
}
{"panel":{"config":"Indstillinger","states":"Oversigt","map":"Kort","logbook":"Logbog","history":"Historik","log_out":"Log af","mailbox":"Postkasse","shopping_list":"Indkøbsliste"}}

View File

@ -1,12 +1 @@
{
"panel": {
"config": "Konfiguration",
"states": "Übersicht",
"map": "Karte",
"logbook": "Logbuch",
"history": "Verlauf",
"log_out": "Abmelden",
"mailbox": "Posteingang",
"shopping_list": "Einkaufsliste"
}
}
{"panel":{"config":"Einstellungen","states":"Übersicht","map":"Karte","logbook":"Logbuch","history":"Verlauf","log_out":"Abmelden","mailbox":"Posteingang","shopping_list":"Einkaufsliste"}}

View File

@ -1,10 +1 @@
{
"panel": {
"config": "Ρυθμίσεις",
"states": "Επισκόπηση",
"map": "Χάρτης",
"logbook": "Αρχείο Συμβάντων",
"history": "Ιστορικό",
"log_out": "Αποσύνδεση"
}
}
{"panel":{"config":"Ρυθμίσεις","states":"Επισκόπηση","map":"Χάρτης","logbook":"Αρχείο Συμβάντων","history":"Ιστορικό","log_out":"Αποσύνδεση","mailbox":"Γραμματοκιβώτιο","shopping_list":"Λίστα αγορών"}}

View File

@ -1,12 +1 @@
{
"panel": {
"config": "Configuration",
"states": "Overview",
"map": "Map",
"logbook": "Logbook",
"history": "History",
"log_out": "Log Out",
"mailbox": "Mailbox",
"shopping_list": "Shopping List"
}
}
{"panel":{"config":"Configuration","states":"Overview","map":"Map","logbook":"Logbook","history":"History","log_out":"Log out","mailbox":"Mailbox","shopping_list":"Shopping list"}}

1
translations/es-419.json Normal file
View File

@ -0,0 +1 @@
{"panel":{"config":"Configuración","states":"Resumen","map":"Mapa","logbook":"Registro","history":"Historial","log_out":"Cerrar sesión","mailbox":"Buzón","shopping_list":"Lista de compras"}}

1
translations/es.json Normal file
View File

@ -0,0 +1 @@
{"panel":{"config":"Configuración","states":"Resumen","map":"Mapa","logbook":"Registro","history":"Historial","log_out":"Cerrar sesión","mailbox":"Buzón","shopping_list":"Lista de la compra"}}

1
translations/et.json Normal file
View File

@ -0,0 +1 @@
{"panel":{"config":"Seaded","states":"Ülevaade","map":"Kaart","logbook":"Logi","history":"Ajalugu","log_out":"Logi välja","mailbox":"Postkast","shopping_list":"Ostunimekiri"}}

View File

@ -1,9 +1 @@
{
"panel": {
"states": "وضعیت",
"map": "نقشه",
"logbook": "گزارش روزانه",
"history": "تاریخچه",
"log_out": "خروج"
}
}
{"panel":{"config":"پیکربندی","states":"وضعیت","map":"نقشه","logbook":"گزارش روزانه","history":"تاریخچه","log_out":"خروج","mailbox":"صندوق پستی","shopping_list":"لیست خرید"}}

View File

@ -1,11 +1 @@
{
"panel": {
"config": "Asetukset",
"states": "Yleisnäkymä",
"map": "Kartta",
"logbook": "Lokikirja",
"history": "Historia",
"log_out": "Kirjaudu ulos",
"shopping_list": "Ostoslista"
}
}
{"panel":{"config":"Asetukset","states":"Yleisnäkymä","map":"Kartta","logbook":"Lokikirja","history":"Historia","log_out":"Kirjaudu ulos","mailbox":"Postilaatikko","shopping_list":"Ostoslista"}}

View File

@ -1,11 +1 @@
{
"panel": {
"config": "Configuration",
"states": "États",
"map": "Carte",
"logbook": "Journal",
"history": "Historique",
"log_out": "Déconnexion",
"shopping_list": "Liste de courses"
}
}
{"panel":{"config":"Configuration","states":"Aperçu","map":"Carte","logbook":"Journal","history":"Historique","log_out":"Déconnexion","mailbox":"Boîtes aux lettres","shopping_list":"Liste de courses"}}

1
translations/gsw.json Normal file
View File

@ -0,0 +1 @@
{"panel":{"config":"Istellige","states":"Übersicht","map":"Charte","logbook":"Logbuech","history":"Vrlouf","log_out":"Uslogge","mailbox":"Postigang","shopping_list":"Ichoufsliste"}}

1
translations/he.json Normal file
View File

@ -0,0 +1 @@
{"panel":{"config":"הגדרות","states":"סקירה כללית","map":"מפה","logbook":"יומן אירועים","history":"היסטוריה","log_out":"התנתק","mailbox":"תיבת דואר","shopping_list":"רשימת קניות"}}

1
translations/hi.json Normal file
View File

@ -0,0 +1 @@
{"panel":{"config":"कॉंफ़िगरेशन","states":"स्थिति","map":"नक्शा","logbook":"रिपोर्ट","history":"इतिहास","log_out":"लॉग आउट","mailbox":"मेलबॉक्स","shopping_list":"खरीदारी की सूची"}}

1
translations/hr.json Normal file
View File

@ -0,0 +1 @@
{"panel":{"config":"Konfiguracija","states":"Pregled","map":"Karta","logbook":"Dnenik","history":"Povijest","log_out":"Odjava","mailbox":"Pošta","shopping_list":"Popis za kupovinu"}}

View File

@ -1,10 +1 @@
{
"panel": {
"config": "Konfiguráció",
"states": "Áttekintés",
"map": "Térkép",
"logbook": "Napló",
"history": "Előzmények",
"log_out": "Kilépés"
}
}
{"panel":{"config":"Konfiguráció","states":"Áttekintés","map":"Térkép","logbook":"Napló","history":"Előzmények","log_out":"Kilépés","mailbox":"Postafiók","shopping_list":"Bevásárló lista"}}

View File

@ -1,12 +1 @@
{
"panel": {
"config": "Configurazione",
"states": "Stati",
"map": "Mappa",
"logbook": "Registro",
"history": "Storico",
"log_out": "Esci",
"mailbox": "Messaggi",
"shopping_list": "Lista della spesa"
}
}
{"panel":{"config":"Impostazioni","states":"Stato","map":"Mappa","logbook":"Registro","history":"Storico","log_out":"Esci","mailbox":"Posta","shopping_list":"Lista della spesa"}}

View File

@ -1,9 +1 @@
{
"panel": {
"states": "状態",
"map": "地図",
"logbook": "ログブック",
"history": "履歴",
"log_out": "ログアウト"
}
}
{"panel":{"config":"設定","states":"状態","map":"地図","logbook":"ログブック","history":"履歴","log_out":"ログアウト","mailbox":"メールボックス","shopping_list":"買い物リスト"}}

1
translations/lb.json Normal file
View File

@ -0,0 +1 @@
{"panel":{"config":"Astellungen","states":"Iwwersiicht","map":"Kaart","logbook":"Journal","history":"Verlaf","log_out":"Ausloggen","mailbox":"Bréifkëscht","shopping_list":"Akafslëscht"}}

View File

@ -1,9 +1 @@
{
"panel": {
"states": "Valdymas",
"map": "Žemėlapis",
"logbook": "Veiksmų žurnalas",
"history": "Istorija",
"log_out": "Atsijungti"
}
}
{"panel":{"config":"Konfigūracija","states":"Valdymas","map":"Žemėlapis","logbook":"Veiksmų žurnalas","history":"Istorija","log_out":"Atsijungti","mailbox":"Pašto dėžutė","shopping_list":"Pirkinių sąrašas"}}

View File

@ -1,10 +1 @@
{
"panel": {
"config": "Instellingen",
"states": "Overzicht",
"map": "Kaart",
"logbook": "Logboek",
"history": "Geschiedenis",
"log_out": "Uitloggen"
}
}
{"panel":{"config":"Instellingen","states":"Overzicht","map":"Kaart","logbook":"Logboek","history":"Geschiedenis","log_out":"Uitloggen","mailbox":"Postvak","shopping_list":"Boodschappenlijst"}}

View File

@ -1,12 +1 @@
{
"panel": {
"config": "Innstillinger",
"states": "Oversikt",
"map": "Kart",
"logbook": "Loggbok",
"history": "Historie",
"log_out": "Logg av",
"mailbox": "Postboks",
"shopping_list": "Handleliste"
}
}
{"panel":{"config":"Konfigurasjon","states":"Oversikt","map":"Kart","logbook":"Loggbok","history":"Historie","log_out":"Logg ut","mailbox":"Postkasse","shopping_list":"Handleliste"}}

View File

@ -1,9 +1 @@
{
"panel": {
"states": "Stany",
"map": "Mapa",
"logbook": "Dziennik",
"history": "Historia",
"log_out": "Wyloguj"
}
}
{"panel":{"config":"Ustawienia","states":"Przegląd","map":"Mapa","logbook":"Dziennik","history":"Historia","log_out":"Wyloguj","mailbox":"Poczta","shopping_list":"Lista zakupów"}}

View File

@ -1,9 +1 @@
{
"panel": {
"states": "Estados",
"map": "Mapa",
"logbook": "Eventos",
"history": "Histórico",
"log_out": "Desconectar"
}
}
{"panel":{"config":"Configuração","states":"Visão Geral","map":"Mapa","logbook":"Eventos","history":"Histórico","log_out":"Sair","mailbox":"Correio","shopping_list":"Lista de compras"}}

1
translations/ro.json Normal file
View File

@ -0,0 +1 @@
{"panel":{"config":"Configurare","states":"Prezentare generală","map":"Hartă","logbook":"Jurnal","history":"Istoric","log_out":"Deconectați-vă","mailbox":"Cutie poștală","shopping_list":"Listă de cumpărături"}}

View File

@ -1,10 +1 @@
{
"panel": {
"config": "Настройки",
"states": "Обзор",
"map": "Карта",
"logbook": "Журнал",
"history": "История",
"log_out": "Выход"
}
}
{"panel":{"config":"Настройки","states":"Обзор","map":"Карта","logbook":"Журнал","history":"История","log_out":"Выход","mailbox":"Почтовый ящик","shopping_list":"Список покупок"}}

1
translations/sl.json Normal file
View File

@ -0,0 +1 @@
{"panel":{"config":"Konfiguracija","states":"Pregled","map":"Zemljevid","logbook":"Dnevnik","history":"Zgodovina","log_out":"Odjava","mailbox":"Nabiralnik","shopping_list":"Nakupovalni seznam"}}

View File

@ -0,0 +1 @@
{"panel":{"config":"Konfiguracija","states":"Pregled","map":"Mapa","logbook":"Dnevnik","history":"Istorija","log_out":"Odjaviti se","mailbox":"Poštansko sanduče","shopping_list":"Lista za kupovinu"}}

1
translations/sr.json Normal file
View File

@ -0,0 +1 @@
{"panel":{"config":"Конфигурација","states":"Преглед","map":"Мапа","logbook":"Дневник","history":"Историја","log_out":"Одјавити се","mailbox":"Поштанско сандуче","shopping_list":"Листа за куповину"}}

View File

@ -1,9 +1 @@
{
"panel": {
"states": "Översikt",
"map": "Karta",
"logbook": "Loggbok",
"history": "Historik",
"log_out": "Logga Ut"
}
}
{"panel":{"config":"Konfiguration","states":"Översikt","map":"Karta","logbook":"Loggbok","history":"Historik","log_out":"Logga ut","mailbox":"Brevlåda","shopping_list":"Inköpslista"}}

1
translations/ta.json Normal file
View File

@ -0,0 +1 @@
{"panel":{"config":"அமைப்புகள்","states":"கண்ணோட்டம்","map":"வரைபடம்","logbook":"பதிவேடுகள்","history":"வரலாறு","log_out":"வெளியேறு","mailbox":"அஞ்சல் பெட்டி","shopping_list":"ஷாப்பிங் பட்டியல்"}}

1
translations/te.json Normal file
View File

@ -0,0 +1 @@
{"panel":{"config":"అమరిక","states":"టూకీగా","map":"మ్యాప్","logbook":"చిట్టా","history":"చరిత్ర","log_out":"లాగ్ అవుట్","mailbox":"మెయిల్ బాక్స్","shopping_list":"షాపింగ్ జాబితా"}}

View File

@ -1,9 +1 @@
{
"panel": {
"states": "ภาพรวม",
"map": "แผนที่",
"logbook": "สมุดบันทึก",
"history": "ประวัติ",
"log_out": "ลงชื่อออก"
}
}
{"panel":{"states":"ภาพรวม","map":"แผนที่","logbook":"สมุดบันทึก","history":"ประวัติ","log_out":"ลงชื่อออก"}}

View File

@ -1,10 +1 @@
{
"panel": {
"config": "Ayarlar",
"states": "Durum",
"map": "Harita",
"logbook": "Kayıt Defteri",
"history": "Geçmiş",
"log_out": ıkış Yap"
}
}
{"panel":{"config":"Ayarlar","states":"Genel durum","map":"Harita","logbook":"Kayıt defteri","history":"Geçmiş","log_out":ıkış yap","mailbox":"Posta kutusu","shopping_list":"Alışveriş listesi"}}

View File

@ -1,10 +1 @@
{
"panel": {
"config": "Cấu hình",
"states": "Tổng quan",
"map": "Bản đồ",
"logbook": "Nhật ký",
"history": "Lịch sử",
"log_out": "Đăng xuất"
}
}
{"panel":{"config":"Cấu hình","states":"Tổng quan","map":"Bản đồ","logbook":"Nhật ký","history":"Lịch sử","log_out":"Đăng xuất","mailbox":"Hộp thư","shopping_list":"Danh sách mua sắm"}}

View File

@ -1,10 +1 @@
{
"panel": {
"config": "配置",
"states": "概览",
"map": "地图",
"logbook": "日志",
"history": "历史",
"log_out": "退出"
}
}
{"panel":{"config":"配置","states":"概览","map":"地图","logbook":"日志","history":"历史","log_out":"退出","mailbox":"邮箱","shopping_list":"购物清单"}}

View File

@ -1,10 +1 @@
{
"panel": {
"config": "設定",
"states": "概覽",
"map": "地圖",
"logbook": "日誌",
"history": "歷史",
"log_out": "登出"
}
}
{"panel":{"config":"設定","states":"概覽","map":"地圖","logbook":"日誌","history":"歷史","log_out":"登出","mailbox":"郵箱","shopping_list":"購物清單"}}

View File

@ -2874,7 +2874,7 @@ etag@~1.8.1:
version "1.8.1"
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
event-stream@^3.0.20:
event-stream@^3.0.20, event-stream@^3.3.1:
version "3.3.4"
resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571"
dependencies:
@ -3767,6 +3767,12 @@ gulp-sourcemaps@1.6.0:
through2 "^2.0.0"
vinyl "^1.0.0"
gulp-streamify@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/gulp-streamify/-/gulp-streamify-1.0.2.tgz#00d6b3814d486c088f78738ed0766abc16389e4d"
dependencies:
plexer "1.0.1"
gulp-uglify@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/gulp-uglify/-/gulp-uglify-3.0.0.tgz#0df0331d72a0d302e3e37e109485dddf33c6d1ca"
@ -3815,6 +3821,18 @@ gulp-util@^3.0.0, gulp-util@^3.0.6, gulp-util@^3.0.8, gulp-util@~3.0.4:
through2 "^2.0.0"
vinyl "^0.5.0"
gulp-vinyl-zip@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/gulp-vinyl-zip/-/gulp-vinyl-zip-2.1.0.tgz#24e40685dc05b7149995245099e0590263be8dad"
dependencies:
event-stream "^3.3.1"
queue "^4.2.1"
through2 "^2.0.3"
vinyl "^2.0.2"
vinyl-fs "^2.0.0"
yauzl "^2.2.1"
yazl "^2.2.1"
gulp@^3.9.1:
version "3.9.1"
resolved "https://registry.yarnpkg.com/gulp/-/gulp-3.9.1.tgz#571ce45928dd40af6514fc4011866016c13845b4"
@ -4516,7 +4534,7 @@ isomorphic-fetch@^2.1.1:
node-fetch "^1.0.1"
whatwg-fetch ">=0.10.0"
isstream@0.1.x, isstream@~0.1.2:
isstream@0.1.x, isstream@^0.1.2, isstream@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
@ -5940,6 +5958,13 @@ pkg-dir@^1.0.0:
dependencies:
find-up "^1.0.0"
plexer@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/plexer/-/plexer-1.0.1.tgz#a801b652bf8145739795ea4d3bf0af946c30c0dd"
dependencies:
isstream "^0.1.2"
readable-stream "^2.0.2"
plist@^2.0.1:
version "2.1.0"
resolved "https://registry.yarnpkg.com/plist/-/plist-2.1.0.tgz#57ccdb7a0821df21831217a3cad54e3e146a1025"
@ -6298,6 +6323,12 @@ qs@~6.4.0:
version "6.4.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233"
queue@^4.2.1:
version "4.4.2"
resolved "https://registry.yarnpkg.com/queue/-/queue-4.4.2.tgz#5a9733d9a8b8bd1b36e934bc9c55ab89b28e29c7"
dependencies:
inherits "~2.0.0"
randomatic@^1.1.3:
version "1.1.7"
resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c"
@ -7979,7 +8010,7 @@ vinyl-fs@^0.3.0:
through2 "^0.6.1"
vinyl "^0.4.0"
vinyl-fs@^2.4.3, vinyl-fs@^2.4.4:
vinyl-fs@^2.0.0, vinyl-fs@^2.4.3, vinyl-fs@^2.4.4:
version "2.4.4"
resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-2.4.4.tgz#be6ff3270cb55dfd7d3063640de81f25d7532239"
dependencies:
@ -8036,7 +8067,7 @@ vinyl@^1.0.0, vinyl@^1.1.0, vinyl@^1.1.1, vinyl@^1.2.0:
clone-stats "^0.0.1"
replace-ext "0.0.1"
vinyl@^2.0.1:
vinyl@^2.0.1, vinyl@^2.0.2:
version "2.1.0"
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.1.0.tgz#021f9c2cf951d6b939943c89eb5ee5add4fd924c"
dependencies:
@ -8344,6 +8375,13 @@ yargs@~3.10.0:
decamelize "^1.0.0"
window-size "0.1.0"
yauzl@^2.2.1:
version "2.9.1"
resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.9.1.tgz#a81981ea70a57946133883f029c5821a89359a7f"
dependencies:
buffer-crc32 "~0.2.3"
fd-slicer "~1.0.1"
yauzl@^2.5.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.8.0.tgz#79450aff22b2a9c5a41ef54e02db907ccfbf9ee2"
@ -8351,6 +8389,12 @@ yauzl@^2.5.0:
buffer-crc32 "~0.2.3"
fd-slicer "~1.0.1"
yazl@^2.2.1:
version "2.4.3"
resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.4.3.tgz#ec26e5cc87d5601b9df8432dbdd3cd2e5173a071"
dependencies:
buffer-crc32 "~0.2.3"
yeast@0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"