From 8afc1e9354e72eff86c5b5a2575c497a21531b16 Mon Sep 17 00:00:00 2001 From: Myeongjin Date: Thu, 12 May 2016 23:44:28 +0900 Subject: [PATCH] Add localisable strings (#2438) * Add localisable string for recursive transclusion error * Add localisable string for count * Add localisable strings for syncer --- core/language/en-GB/Misc.multids | 5 +++++ core/modules/syncer.js | 4 ++-- core/modules/utils/dom/http.js | 2 +- core/modules/widgets/transclude.js | 2 +- core/ui/AlertTemplate.tid | 2 +- languages/da-DK/Misc.multids | 1 + languages/de-DE/Misc.multids | 1 + languages/es-ES/Misc.multids | 1 + languages/it-IT/Misc.multids | 1 + languages/ko-KR/Misc.multids | 5 +++++ languages/nl-NL/Misc.multids | 1 + languages/ru-RU/Misc.multids | 1 + languages/sv-SE/Misc.multids | 1 + languages/zh-Hans/Misc.multids | 1 + languages/zh-Hant/Misc.multids | 1 + plugins/tiddlywiki/tw2parser/classictransclude.js | 2 +- 16 files changed, 25 insertions(+), 6 deletions(-) diff --git a/core/language/en-GB/Misc.multids b/core/language/en-GB/Misc.multids index 5eca98e46..a654dd709 100644 --- a/core/language/en-GB/Misc.multids +++ b/core/language/en-GB/Misc.multids @@ -10,6 +10,7 @@ ConfirmCancelTiddler: Do you wish to discard changes to the tiddler "<$text text ConfirmDeleteTiddler: Do you wish to delete the tiddler "<$text text=<>/>"? ConfirmOverwriteTiddler: Do you wish to overwrite the tiddler "<$text text=<<title>>/>"? ConfirmEditShadowTiddler: You are about to edit a ShadowTiddler. Any changes will override the default system making future upgrades non-trivial. Are you sure you want to edit "<$text text=<<title>>/>"? +Count: count DefaultNewTiddlerTitle: New Tiddler DropMessage: Drop here (or use the 'Escape' key to cancel) Encryption/Cancel: Cancel @@ -30,6 +31,10 @@ OfficialPluginLibrary: Official ~TiddlyWiki Plugin Library OfficialPluginLibrary/Hint: The official ~TiddlyWiki plugin library at tiddlywiki.com. Plugins, themes and language packs are maintained by the core team. PluginReloadWarning: Please save {{$:/core/ui/Buttons/save-wiki}} and reload {{$:/core/ui/Buttons/refresh}} to allow changes to plugins to take effect RecentChanges/DateFormat: DDth MMM YYYY +RecursiveTransclusion: Recursive transclusion error in transclude widget +Syncer/ErrorRetrievingSkinny: Error retrieving skinny tiddler list +Syncer/LoginToTiddlySpace: Login to TiddlySpace +Syncer/XMLHttpRequestError: XMLHttpRequest error code SystemTiddler/Tooltip: This is a system tiddler TagManager/Colour/Heading: Colour TagManager/Count/Heading: Count diff --git a/core/modules/syncer.js b/core/modules/syncer.js index 15934ca9d..de970ebec 100644 --- a/core/modules/syncer.js +++ b/core/modules/syncer.js @@ -196,7 +196,7 @@ Syncer.prototype.syncFromServer = function() { },self.pollTimerInterval); // Check for errors if(err) { - self.logger.alert("Error retrieving skinny tiddler list:",err); + self.logger.alert($tw.language.getString("Syncer/ErrorRetrievingSkinny") + ":",err); return; } // Process each incoming tiddler @@ -275,7 +275,7 @@ Syncer.prototype.handleLoginEvent = function() { this.getStatus(function(err,isLoggedIn,username) { if(!isLoggedIn) { $tw.passwordPrompt.createPrompt({ - serviceName: "Login to TiddlySpace", + serviceName: $tw.language.getString("Syncer/LoginToTiddlySpace"), callback: function(data) { self.login(data.username,data.password,function(err,isLoggedIn) { self.syncFromServer(); diff --git a/core/modules/utils/dom/http.js b/core/modules/utils/dom/http.js index 2e6b3e9b0..5e56e54e9 100644 --- a/core/modules/utils/dom/http.js +++ b/core/modules/utils/dom/http.js @@ -45,7 +45,7 @@ exports.httpRequest = function(options) { return; } // Something went wrong - options.callback("XMLHttpRequest error code: " + this.status); + options.callback($tw.language.getString("Syncer/XMLHttpRequestError") + ": " + this.status); } }; // Make the request diff --git a/core/modules/widgets/transclude.js b/core/modules/widgets/transclude.js index 34a912851..9b3583c04 100755 --- a/core/modules/widgets/transclude.js +++ b/core/modules/widgets/transclude.js @@ -68,7 +68,7 @@ TranscludeWidget.prototype.execute = function() { parseTreeNodes = [{type: "element", tag: "span", attributes: { "class": {type: "string", value: "tc-error"} }, children: [ - {type: "text", text: "Recursive transclusion error in transclude widget"} + {type: "text", text: $tw.language.getString("RecursiveTransclusion")} ]}]; } } diff --git a/core/ui/AlertTemplate.tid b/core/ui/AlertTemplate.tid index 87ddbd376..bcfc3c3fa 100644 --- a/core/ui/AlertTemplate.tid +++ b/core/ui/AlertTemplate.tid @@ -5,7 +5,7 @@ title: $:/core/ui/AlertTemplate <$button class="tc-btn-invisible"><$action-deletetiddler $tiddler=<<currentTiddler>>/>{{$:/core/images/delete-button}}</$button> </div> <div class="tc-alert-subtitle"> -<$view field="component"/> - <$view field="modified" format="date" template="0hh:0mm:0ss DD MM YYYY"/> <$reveal type="nomatch" state="!!count" text=""><span class="tc-alert-highlight">(count: <$view field="count"/>)</span></$reveal> +<$view field="component"/> - <$view field="modified" format="date" template="0hh:0mm:0ss DD MM YYYY"/> <$reveal type="nomatch" state="!!count" text=""><span class="tc-alert-highlight">({{$:/language/Count}}: <$view field="count"/>)</span></$reveal> </div> <div class="tc-alert-body"> diff --git a/languages/da-DK/Misc.multids b/languages/da-DK/Misc.multids index c38a95b00..5cc966c57 100644 --- a/languages/da-DK/Misc.multids +++ b/languages/da-DK/Misc.multids @@ -9,6 +9,7 @@ ConfirmCancelTiddler: Ønsker du at fortryde ændringer til denne tiddler "<$tex ConfirmDeleteTiddler: Ønsker du at slette denne tiddler "<$text text=<<title>>/>"? ConfirmEditShadowTiddler: Du skal til at redigere en skyggetiddler. Enhver ændring vil overskrive standardsystemet og gøre fremtidige opgraderinger mere besværlige. Er du sikker på, du ønsker at redigere "<$text text=<<title>>/>"? ConfirmOverwriteTiddler: Ønsker du at overskrive tiddleren "<$text text=<<title>>/>"? +Count: tæl DefaultNewTiddlerTitle: Ny tiddler DropMessage: Slip her (eller klik escape for at fortryde) Encryption/Cancel: Fortryd diff --git a/languages/de-DE/Misc.multids b/languages/de-DE/Misc.multids index 380483f47..9383c166e 100644 --- a/languages/de-DE/Misc.multids +++ b/languages/de-DE/Misc.multids @@ -10,6 +10,7 @@ ConfirmCancelTiddler: Wollen Sie die Änderungen im Tiddler: "<$text text=<<titl ConfirmDeleteTiddler: Wollen Sie den Tiddler: "<$text text=<<title>>/>" löschen? ConfirmOverwriteTiddler: Tiddler: "<$text text=<<title>>/>" existiert! OK überschreibt den tiddler! ConfirmEditShadowTiddler: Sie sind dabei, einen Schatten-Tiddler zu verändern. Zukünftige, automatische Anpassungen werden dadurch unterdrückt. Sie können Ihre Änderungen rückgängig machen, indem Sie diesen Tiddler wieder löschen. Wollen Sie den Tiddler: "<$text text=<<title>>/>" ändern? +Count: Anzahl DefaultNewTiddlerTitle: Neuer Tiddler DropMessage: Hierher ziehen (oder Escape um abzubrechen) Encryption/Cancel: Abbrechen diff --git a/languages/es-ES/Misc.multids b/languages/es-ES/Misc.multids index 2375126de..f2d0f7d83 100644 --- a/languages/es-ES/Misc.multids +++ b/languages/es-ES/Misc.multids @@ -15,6 +15,7 @@ ConfirmEditShadowTiddler: Estás a punto de editar un tiddler oculto<br> Todo cambio en él afectará al sistema por defecto y pondrá en riesgo futuras actualizaciones del sistema<br> ¿Estás seguro de querer editar "<$text text=<<title>>/>"? ConfirmOverwriteTiddler: ¿Deseas sobreescribir "<$text text=<<title>>/>"? +Count: Número DefaultNewTiddlerTitle: Nuevo Tiddler DropMessage: Suéltalo aquí o pulsa ''ESC'' para cancelar Encryption/Cancel: Cancelar diff --git a/languages/it-IT/Misc.multids b/languages/it-IT/Misc.multids index 3d2d2d00d..2bd783af9 100644 --- a/languages/it-IT/Misc.multids +++ b/languages/it-IT/Misc.multids @@ -8,6 +8,7 @@ ConfirmCancelTiddler: Vuoi annullare le modifiche al frammento "<$text text=<<ti ConfirmDeleteTiddler: Vuoi cancellare il frammento "<$text text=<<title>>/>"? ConfirmEditShadowTiddler: Stai per editare un frammento nascosto. Ogni modifica dei default di sistema renderà i futuri aggiornamenti non semplici. Sei sicuro di voler editare "<$text text=<<title>>/>"? ConfirmOverwriteTiddler: Vuoi sovrascrivere il frammento "<$text text=<<title>>/>"? +Count: Conteggio DefaultNewTiddlerTitle: Nuovo frammento DropMessage: Rilascia qui (o usa il tasto 'Escape' per cancellare) Encryption/Cancel: Cancella diff --git a/languages/ko-KR/Misc.multids b/languages/ko-KR/Misc.multids index b85e76864..40b2d1836 100644 --- a/languages/ko-KR/Misc.multids +++ b/languages/ko-KR/Misc.multids @@ -10,6 +10,7 @@ ConfirmCancelTiddler: "<$text text=<<title>>/>" 티들러의 바뀜을 버리겠 ConfirmDeleteTiddler: "<$text text=<<title>>/>" 티들러를 삭제하겠습니까? ConfirmEditShadowTiddler: 섀도우티들러를 편집하려고 합니다. 어떠한 바뀜도 향후 업그레이드가 하찮지 않게 하는 기본 시스템을 덮어씁니다. "<$text text=<<title>>/>" 티들러를 편집하겠습니까? ConfirmOverwriteTiddler: "<$text text=<<title>>/>" 티들러를 덮어쓰겠습니까? +Count: 횟수 DefaultNewTiddlerTitle: 새 티들러 DropMessage: 여기에 놓기 (또는 취소하려면 'Escape' 키 사용) Encryption/Cancel: 취소 @@ -34,6 +35,10 @@ OfficialPluginLibrary: 공식 ~TiddlyWiki 플러그인 라이브러리 OfficialPluginLibrary/Hint: tiddlywiki.com에서의 공식 ~TiddlyWiki 플러그인 라이브러리입니다. 플러그인, 테마 및 언어 팩은 코어 팀이 유지 관리하고 있습니다. PluginReloadWarning: 플러그인의 바뀜을 적용할 수 있도록 하려면 저장 {{$:/core/ui/Buttons/save-wiki}}하고 나서 다시 불러오세요 {{$:/core/ui/Buttons/refresh}} RecentChanges/DateFormat: YYYY년 MMM DD일 +RecursiveTransclusion: 끼워넣기 위젯에서 재귀 끼워넣기 오류 +Syncer/ErrorRetrievingSkinny: 날씬한 티들러 목록을 얻는 중 오류 +Syncer/LoginToTiddlySpace: TiddlySpace에 로그인 +Syncer/XMLHttpRequestError: XMLHttpRequest 오류 코드 SystemTiddler/Tooltip: 이것은 시스템 티들러입니다 TagManager/Colour/Heading: 색 TagManager/Count/Heading: 횟수 diff --git a/languages/nl-NL/Misc.multids b/languages/nl-NL/Misc.multids index 26ac56af0..b720e66ae 100644 --- a/languages/nl-NL/Misc.multids +++ b/languages/nl-NL/Misc.multids @@ -9,6 +9,7 @@ ConfirmCancelTiddler: Wil je gemaakte wijzigingen aan de tiddler "<$text text=<< ConfirmDeleteTiddler: Wil je de tiddler "<$text text=<<title>>/>" verwijderen? ConfirmEditShadowTiddler: Je staat op het punt een schaduwtiddler te wijzigen. Toekomstige automatische veranderingen (upgrades) zijn dan niet mogelijk. Wil je "<$text text=<<title>>/>" wijzigen? ConfirmOverwriteTiddler: Wil je de tiddler "<$text text=<<title>>/>" overschrijven? +Count: aantal DefaultNewTiddlerTitle: Nieuwe tiddler DropMessage: 'Drop' hier (of klik escape om te annuleren) Encryption/Cancel: Annuleer diff --git a/languages/ru-RU/Misc.multids b/languages/ru-RU/Misc.multids index 430bd27e1..93b4dcff6 100644 --- a/languages/ru-RU/Misc.multids +++ b/languages/ru-RU/Misc.multids @@ -8,6 +8,7 @@ ConfirmCancelTiddler: Отменить изменения заметки "<$text ConfirmDeleteTiddler: Удалить заметку "<$text text=<<title>>/>"? ConfirmEditShadowTiddler: Вы собираетесь редактировать встроенную заметку. Любое изменение переопределит стандартное значение и может привести к проблемам при обновлении TiddlyWiki. Вы действительно хотите редактировать "<$text text=<<title>>/>"? ConfirmOverwriteTiddler: Заменить заметку "<$text text=<<title>>/>"? +Count: номер DefaultNewTiddlerTitle: Новая заметка DropMessage: Перетащите сюда (или нажмите escape для отмены) Encryption/Cancel: Отмена diff --git a/languages/sv-SE/Misc.multids b/languages/sv-SE/Misc.multids index 12721cb7a..c064be15b 100755 --- a/languages/sv-SE/Misc.multids +++ b/languages/sv-SE/Misc.multids @@ -8,6 +8,7 @@ ConfirmCancelTiddler: Vill du ångra ändringar för denna tiddler "<$text text= ConfirmDeleteTiddler: Vill du ta bort denna tiddler "<$text text=<<title>>/>"? ConfirmOverwriteTiddler: Vill du skriva över denna tiddler "<$text text=<<title>>/>"? ConfirmEditShadowTiddler: You are about to edit a ShadowTiddler. Any changes will override the default system making future upgrades non-trivial. Are you sure you want to edit "<$text text=<<title>>/>"? +Count: antal DefaultNewTiddlerTitle: Ny Tiddler DropMessage: Drop here (or use the 'Escape' key to cancel) Encryption/Cancel: Avbryt diff --git a/languages/zh-Hans/Misc.multids b/languages/zh-Hans/Misc.multids index a5f70d246..81e41f05b 100644 --- a/languages/zh-Hans/Misc.multids +++ b/languages/zh-Hans/Misc.multids @@ -10,6 +10,7 @@ ConfirmCancelTiddler: 您确定要放弃对条目 "<$text text=<<title>>/>" 的 ConfirmDeleteTiddler: 您确定要删除条目 "<$text text=<<title>>/>"? ConfirmOverwriteTiddler: 您确定要覆写条目 "<$text text=<<title>>/>"? ConfirmEditShadowTiddler: 您即将要编辑默认条目,任何更改将会覆盖默认的系统,使未来的升级不寻常。您确定要编辑 "<$text text=<<title>>/>"? +Count: 计数 DefaultNewTiddlerTitle: 新条目 DropMessage: 拖放到此处 (或按 ESC 键取消) Encryption/Cancel: 取消 diff --git a/languages/zh-Hant/Misc.multids b/languages/zh-Hant/Misc.multids index 203d5f13d..9789f3bb2 100644 --- a/languages/zh-Hant/Misc.multids +++ b/languages/zh-Hant/Misc.multids @@ -10,6 +10,7 @@ ConfirmCancelTiddler: 您確定要放棄對條目 "<$text text=<<title>>/>" 的 ConfirmDeleteTiddler: 您確定要刪除條目 "<$text text=<<title>>/>"? ConfirmOverwriteTiddler: 您確定要覆寫條目 "<$text text=<<title>>/>"? ConfirmEditShadowTiddler: 您即將要編輯預設條目,任何更改將會覆蓋預設的系統,使未來的升級不尋常。您確定要編輯 "<$text text=<<title>>/>"? +Count: 計數 DefaultNewTiddlerTitle: 新條目 DropMessage: 拖放到此處 (或按 ESC 鍵取消) Encryption/Cancel: 取消 diff --git a/plugins/tiddlywiki/tw2parser/classictransclude.js b/plugins/tiddlywiki/tw2parser/classictransclude.js index 104aef0eb..ed8c5da76 100644 --- a/plugins/tiddlywiki/tw2parser/classictransclude.js +++ b/plugins/tiddlywiki/tw2parser/classictransclude.js @@ -79,7 +79,7 @@ TranscludeWidget.prototype.execute = function() { // Check for recursion var recursionMarker = this.makeRecursionMarker(); if(this.parentWidget && this.parentWidget.hasVariable("transclusion",recursionMarker)) { - this.makeChildWidgets([{type: "text", text: "Recursive transclusion error in transclude widget"}]); + this.makeChildWidgets([{type: "text", text: $tw.language.getString("RecursiveTransclusion")}]); return; } // Check for correct type