mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-08-03 12:37:15 -04:00
Update localization keys, add validation
This commit is contained in:
parent
54b6bf9512
commit
41fe136560
@ -5,7 +5,7 @@ repos:
|
||||
hooks:
|
||||
- id: generate_localizations
|
||||
name: "Generate localization swift file"
|
||||
entry: python localizations.py Support/en.lproj/Localizable.strings generate
|
||||
entry: python localizations.py generate
|
||||
language: python
|
||||
always_run: true
|
||||
stages: [post-checkout, post-merge, post-rewrite]
|
||||
|
@ -17,42 +17,6 @@ import Foundation
|
||||
|
||||
extension String {
|
||||
|
||||
var localized: String {
|
||||
localizedWithFallback()
|
||||
}
|
||||
|
||||
func localizedWithFormat(withArgs: CVarArg...) -> String {
|
||||
let format = localizedWithFallback()
|
||||
switch withArgs.count {
|
||||
case 1: return String.localizedStringWithFormat(format, withArgs[0])
|
||||
case 2: return String.localizedStringWithFormat(format, withArgs[0], withArgs[1])
|
||||
default: return String.localizedStringWithFormat(format, withArgs)
|
||||
}
|
||||
}
|
||||
|
||||
private func localizedWithFallback(
|
||||
bundle: Bundle = Bundle.main,
|
||||
comment: String = ""
|
||||
) -> String {
|
||||
let englishValue: String
|
||||
if let path = Bundle.main.path(forResource: "en", ofType: "lproj"),
|
||||
let bundle = Bundle(path: path) {
|
||||
englishValue = NSLocalizedString(self, bundle: bundle, comment: comment)
|
||||
if NSLocale.preferredLanguages.first == "en" {
|
||||
return englishValue
|
||||
}
|
||||
} else {
|
||||
englishValue = ""
|
||||
}
|
||||
return NSLocalizedString(
|
||||
self,
|
||||
tableName: nil,
|
||||
bundle: bundle,
|
||||
value: englishValue, // fall back to this, if translation not found
|
||||
comment: comment
|
||||
)
|
||||
}
|
||||
|
||||
func removingPrefix(_ value: String) -> String {
|
||||
guard hasPrefix(value) else { return self }
|
||||
return String(dropFirst(value.count))
|
||||
|
56
Support/StringLocalExtension.swift_temp
Normal file
56
Support/StringLocalExtension.swift_temp
Normal file
@ -0,0 +1,56 @@
|
||||
// This file is part of Kiwix for iOS & macOS.
|
||||
//
|
||||
// Kiwix 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
|
||||
// any later version.
|
||||
//
|
||||
// Kiwix 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 Kiwix; If not, see https://www.gnu.org/licenses/.
|
||||
|
||||
import Foundation
|
||||
|
||||
fileprivate extension String {
|
||||
|
||||
var localized: String {
|
||||
localizedWithFallback()
|
||||
}
|
||||
|
||||
func localizedWithFormat(withArgs: CVarArg...) -> String {
|
||||
let format = localizedWithFallback()
|
||||
switch withArgs.count {
|
||||
case 1: return String.localizedStringWithFormat(format, withArgs[0])
|
||||
case 2: return String.localizedStringWithFormat(format, withArgs[0], withArgs[1])
|
||||
default: return String.localizedStringWithFormat(format, withArgs)
|
||||
}
|
||||
}
|
||||
|
||||
private func localizedWithFallback(
|
||||
bundle: Bundle = Bundle.main,
|
||||
comment: String = ""
|
||||
) -> String {
|
||||
let englishValue: String
|
||||
if let path = Bundle.main.path(forResource: "en", ofType: "lproj"),
|
||||
let bundle = Bundle(path: path) {
|
||||
englishValue = NSLocalizedString(self, bundle: bundle, comment: comment)
|
||||
if NSLocale.preferredLanguages.first == "en" {
|
||||
return englishValue
|
||||
}
|
||||
} else {
|
||||
englishValue = ""
|
||||
}
|
||||
return NSLocalizedString(
|
||||
self,
|
||||
tableName: nil,
|
||||
bundle: bundle,
|
||||
value: englishValue, // fall back to this, if translation not found
|
||||
comment: comment
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,6 @@
|
||||
"common.tab.list.close" = "Serriñ ar steudenn";
|
||||
"common.tab.menu.library" = "Levraoueg";
|
||||
"common.tab.menu.settings" = "Arventennoù";
|
||||
"common.support.app_name" = "Skoazellañ %@";
|
||||
"common.export_file.alert.title" = "Ezporzhiañ ar restr";
|
||||
"common.export_file.alert.description" = "Fellout a ra deoc'h ezporzhiañ ar restr %@?";
|
||||
"common.export_file.alert.button.title" = "Ezporzhiañ";
|
||||
@ -51,7 +50,7 @@
|
||||
"flavor_tag.help.no_pic" = "lamet eo bet darn vrasañ ar skeudennoù";
|
||||
"library_refresh_time.last" = "Nevez zo";
|
||||
"library_refresh_time.never" = "James";
|
||||
"zim_file_cell_article_count_suffix" = "pennadoù";
|
||||
"zim_file_cell.article_count.suffix" = "pennadoù";
|
||||
"zim_file_missing_indicator.help" = "Ar restr ZIM a vank.";
|
||||
"library.zim_file_context.main_page.label" = "Degemer";
|
||||
"library.zim_file_context.random.label" = "Pajenn dre zegouezh";
|
||||
@ -65,7 +64,7 @@
|
||||
"zim_file_category.section.empty.message" = "Restr ZIM ebet er rummad-mañ.";
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "Diskouez ar varrenn-gostez";
|
||||
"zim_file_new_overlay.empty" = "Restr ZIM nevez ebet";
|
||||
"zim_file_new_button_refresh" = "Freskaat";
|
||||
"zim_file_new.button.refresh" = "Freskaat";
|
||||
"zim_file.list.name.text" = "Anv";
|
||||
"zim_file.list.description.text" = "Deskrivadur";
|
||||
"zim_file.list.actions.text" = "Oberoù";
|
||||
@ -144,7 +143,6 @@
|
||||
"app_macos_commands.open_file" = "Digeriñ...";
|
||||
"app_macos_commands.new" = "Steudenn nevez";
|
||||
"app_macos_navigation.button.library" = "Levraoueg";
|
||||
"app_macos_navigation.show_sidebar" = "Diskouez ar varrenn-gostez";
|
||||
"sidebar_view.navigation.button.close" = "Serriñ";
|
||||
"sidebar_view.navigation.button.close_all" = "Serriñ an holl steudennoù";
|
||||
"enum.category.wikipedia" = "Wikipedia";
|
||||
|
@ -54,7 +54,7 @@
|
||||
"flavor_tag.help.mini" = "Sabbu ŋɔ bela koŋko nyɛ din be ni, di yi pa shɛli tuuli yaɣili";
|
||||
"library_refresh_time.last" = "Kulla saha ŋɔ";
|
||||
"library_refresh_time.never" = "Abada";
|
||||
"zim_file_cell_article_count_suffix" = "Lahabaya";
|
||||
"zim_file_cell.article_count.suffix" = "Lahabaya";
|
||||
"zim_file_missing_indicator.help" = "Zim fasara nyɛla din kani.";
|
||||
// Fuzzy
|
||||
"library.zim_file_details.side_panel.message" = "Piimi zim fasara n- nya bayana";
|
||||
@ -71,7 +71,7 @@
|
||||
"zim_file_downloads.overlay.empty.message" = "Deebu tuma nima kani";
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "Wuhimi \"Sidebar\"";
|
||||
"zim_file_new_overlay.empty" = "Zim fasara palli kani";
|
||||
"zim_file_new_button_refresh" = "Kahigi";
|
||||
"zim_file_new.button.refresh" = "Kahigi";
|
||||
"zim_file.list.name.text" = "Yuli";
|
||||
"zim_file.list.description.text" = "Buɣisibu";
|
||||
"zim_file.list.actions.text" = "Niŋsim";
|
||||
|
@ -33,7 +33,6 @@
|
||||
"common.tab.list.close" = "Tab schließen";
|
||||
"common.tab.menu.library" = "Bibliothek";
|
||||
"common.tab.menu.settings" = "Einstellungen";
|
||||
"common.support.app_name" = "%@ unterstützen";
|
||||
"outline_button.outline.title" = "Gliederung";
|
||||
"outline_button.outline.help" = "Artikelgliederung anzeigen";
|
||||
"outline_button.outline.empty.message" = "Keine Gliederung vorhanden";
|
||||
@ -62,7 +61,7 @@
|
||||
"flavor_tag.help.mini" = "Es ist nur ein Teil des Textes verfügbar, wahrscheinlich der erste Abschnitt";
|
||||
"library_refresh_time.last" = "Soeben";
|
||||
"library_refresh_time.never" = "Niemals";
|
||||
"zim_file_cell_article_count_suffix" = "Artikel";
|
||||
"zim_file_cell.article_count.suffix" = "Artikel";
|
||||
"zim_file_missing_indicator.help" = "Zim-Datei fehlt.";
|
||||
"library.zim_file_details.side_panel.message" = "Wähle eine ZIM-Datei aus, um Details zu sehen";
|
||||
"library.zim_file_context.main_page.label" = "Hauptseite";
|
||||
@ -80,7 +79,7 @@
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "Seitenleiste anzeigen";
|
||||
// Fuzzy
|
||||
"zim_file_new_overlay.empty" = "Keine neue ZIM-Datei";
|
||||
"zim_file_new_button_refresh" = "Aktualisieren";
|
||||
"zim_file_new.button.refresh" = "Aktualisieren";
|
||||
"zim_file.list.name.text" = "Name";
|
||||
"zim_file.list.description.text" = "Beschreibung";
|
||||
"zim_file.list.actions.text" = "Aktionen";
|
||||
@ -196,7 +195,6 @@
|
||||
"app_macos_commands.open_file" = "Öffnen…";
|
||||
"app_macos_commands.new" = "Neuer Tab";
|
||||
"app_macos_navigation.button.library" = "Bibliothek";
|
||||
"app_macos_navigation.show_sidebar" = "Seitenleiste anzeigen";
|
||||
"sidebar_view.navigation.button.close" = "Schließen";
|
||||
"sidebar_view.navigation.button.close_all" = "Alle Tabs schließen";
|
||||
"enum.category.wikipedia" = "Wikipedia";
|
||||
|
@ -49,7 +49,6 @@
|
||||
"common.tab.list.close" = "Close Tab";
|
||||
"common.tab.menu.library" = "Library";
|
||||
"common.tab.menu.settings" = "Settings";
|
||||
"common.support.app_name" = "Support %@";
|
||||
"common.export_file.alert.title" = "Export file";
|
||||
"common.export_file.alert.description" = "Do you want to export the file %@?";
|
||||
"common.export_file.alert.button.title" = "Export";
|
||||
@ -91,7 +90,7 @@
|
||||
"library_refresh_time.last" = "Just Now";
|
||||
"library_refresh_time.never" = "Never";
|
||||
|
||||
"zim_file_cell_article_count_suffix" = "articles";
|
||||
"zim_file_cell.article_count.suffix" = "articles";
|
||||
|
||||
"zim_file_missing_indicator.help" = "Zim file is missing.";
|
||||
|
||||
@ -113,7 +112,7 @@
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "Show Sidebar";
|
||||
|
||||
"zim_file_new_overlay.empty" = "No new ZIM file";
|
||||
"zim_file_new_button_refresh" = "Refresh";
|
||||
"zim_file_new.button.refresh" = "Refresh";
|
||||
|
||||
"zim_file.list.name.text" = "Name";
|
||||
"zim_file.list.description.text" = "Description";
|
||||
@ -234,7 +233,6 @@
|
||||
"app_macos_commands.open_file" = "Open...";
|
||||
"app_macos_commands.new" = "New Tab";
|
||||
"app_macos_navigation.button.library" = "Library";
|
||||
"app_macos_navigation.show_sidebar" = "Show Sidebar";
|
||||
|
||||
"sidebar_view.navigation.button.close_all" = "Close All Tabs";
|
||||
"sidebar_view.navigation.button.close" = "Close";
|
||||
|
@ -34,7 +34,6 @@
|
||||
"common.tab.list.close" = "Cerrar pestaña";
|
||||
"common.tab.menu.library" = "Biblioteca";
|
||||
"common.tab.menu.settings" = "Configuración";
|
||||
"common.support.app_name" = "%@ de apoyo";
|
||||
"common.export_file.alert.title" = "Exportar archivo";
|
||||
"common.export_file.alert.description" = "¿Quieres exportar el archivo %@?";
|
||||
"common.export_file.alert.button.title" = "Exportar";
|
||||
@ -65,7 +64,7 @@
|
||||
"flavor_tag.help.mini" = "Sólo está disponible un subconjunto del texto, probablemente la primera sección.";
|
||||
"library_refresh_time.last" = "Ahora mismo";
|
||||
"library_refresh_time.never" = "Nunca";
|
||||
"zim_file_cell_article_count_suffix" = "artículos";
|
||||
"zim_file_cell.article_count.suffix" = "artículos";
|
||||
"zim_file_missing_indicator.help" = "Falta el archivo Zim.";
|
||||
"library.zim_file_details.side_panel.message" = "Seleccione un archivo ZIM para ver los detalles";
|
||||
"library.zim_file_context.main_page.label" = "Página principal";
|
||||
@ -82,7 +81,7 @@
|
||||
"zim_file_downloads.overlay.empty.message" = "Sin tareas de descarga";
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "Mostrar barra lateral";
|
||||
"zim_file_new_overlay.empty" = "No hay un nuevo archivo ZIM";
|
||||
"zim_file_new_button_refresh" = "Actualizar";
|
||||
"zim_file_new.button.refresh" = "Actualizar";
|
||||
"zim_file.list.name.text" = "Nombre";
|
||||
"zim_file.list.description.text" = "Descripción";
|
||||
"zim_file.list.actions.text" = "Acciones";
|
||||
@ -194,7 +193,6 @@
|
||||
"app_macos_commands.open_file" = "Abrir...";
|
||||
"app_macos_commands.new" = "Pestaña nueva";
|
||||
"app_macos_navigation.button.library" = "Biblioteca";
|
||||
"app_macos_navigation.show_sidebar" = "Mostrar barra lateral";
|
||||
"sidebar_view.navigation.button.close" = "Cerrar";
|
||||
"sidebar_view.navigation.button.close_all" = "Cerrar todas las pestañas";
|
||||
"enum.category.wikipedia" = "Wikipedia";
|
||||
|
@ -23,7 +23,6 @@
|
||||
"common.tab.list.close" = "Sulje välilehti";
|
||||
"common.tab.menu.library" = "Kirjasto";
|
||||
"common.tab.menu.settings" = "Asetukset";
|
||||
"common.support.app_name" = "Tue %@";
|
||||
"common.export_file.alert.title" = "Vie tiedosto";
|
||||
"common.export_file.alert.description" = "Haluatko viedä tiedoston %@?";
|
||||
"article_shortcut.main.button.title" = "Pääartikkeli";
|
||||
@ -41,7 +40,7 @@
|
||||
"download_task_cell.status.downloading" = "Ladataan...";
|
||||
"download_task_cell.status.paused" = "Pysäytetty";
|
||||
"library_refresh_time.never" = "Ei koskaan";
|
||||
"zim_file_cell_article_count_suffix" = "artikkelia";
|
||||
"zim_file_cell.article_count.suffix" = "artikkelia";
|
||||
"zim_file_missing_indicator.help" = "Zim-tiedosto puuttuu.";
|
||||
"library.zim_file_context.main_page.label" = "Etusivu";
|
||||
"library.zim_file_context.random.label" = "Satunnainen sivu";
|
||||
@ -109,7 +108,6 @@
|
||||
"app_macos_commands.open_file" = "Avaa...";
|
||||
"app_macos_commands.new" = "Uusi välilehti";
|
||||
"app_macos_navigation.button.library" = "Kirjasto";
|
||||
"app_macos_navigation.show_sidebar" = "Näytä sivupalkki";
|
||||
"sidebar_view.navigation.button.close" = "Sulje";
|
||||
"sidebar_view.navigation.button.close_all" = "Sulje kaikki välilehdet";
|
||||
"enum.category.wikibooks" = "Wikikirjasto";
|
||||
|
@ -44,7 +44,6 @@
|
||||
"common.tab.list.close" = "Fermer l’onglet";
|
||||
"common.tab.menu.library" = "Bibliothèque";
|
||||
"common.tab.menu.settings" = "Paramètres";
|
||||
"common.support.app_name" = "Soutenez-nous %@";
|
||||
"common.export_file.alert.title" = "Exporter le fichier";
|
||||
"common.export_file.alert.description" = "Voulez-vous exporter le fichier %@ ?";
|
||||
"common.export_file.alert.button.title" = "Exporter";
|
||||
@ -75,7 +74,7 @@
|
||||
"flavor_tag.help.mini" = "seul un sous-ensemble du texte est disponible, probablement la première section";
|
||||
"library_refresh_time.last" = "À l’instant";
|
||||
"library_refresh_time.never" = "Jamais";
|
||||
"zim_file_cell_article_count_suffix" = "articles";
|
||||
"zim_file_cell.article_count.suffix" = "articles";
|
||||
"zim_file_missing_indicator.help" = "Le fichier Zim est manquant.";
|
||||
"library.zim_file_details.side_panel.message" = "Sélectionnez un fichier ZIM pour voir les détails";
|
||||
"library.zim_file_context.main_page.label" = "Page principale";
|
||||
@ -92,7 +91,7 @@
|
||||
"zim_file_downloads.overlay.empty.message" = "Aucune tâche de téléchargement";
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "Afficher la barre latérale";
|
||||
"zim_file_new_overlay.empty" = "Pas de nouveau fichier ZIM";
|
||||
"zim_file_new_button_refresh" = "Actualiser";
|
||||
"zim_file_new.button.refresh" = "Actualiser";
|
||||
"zim_file.list.name.text" = "Nom";
|
||||
"zim_file.list.description.text" = "Description";
|
||||
"zim_file.list.actions.text" = "Actions";
|
||||
@ -204,7 +203,6 @@
|
||||
"app_macos_commands.open_file" = "Ouvrir...";
|
||||
"app_macos_commands.new" = "Nouvel onglet";
|
||||
"app_macos_navigation.button.library" = "Bibliothèque";
|
||||
"app_macos_navigation.show_sidebar" = "Afficher la barre latérale";
|
||||
"sidebar_view.navigation.button.close" = "Fermer";
|
||||
"sidebar_view.navigation.button.close_all" = "Fermer tous les onglets";
|
||||
"enum.category.wikipedia" = "Wikipédia";
|
||||
|
@ -61,7 +61,7 @@
|
||||
"flavor_tag.help.mini" = "Juzu'in rubutu ne kawai yaka samuwa, tayiyu da farkon sashi";
|
||||
"library_refresh_time.last" = "Yanxu yanxu";
|
||||
"library_refresh_time.never" = "Ba a taɓa yin hakan ba";
|
||||
"zim_file_cell_article_count_suffix" = "Makalu";
|
||||
"zim_file_cell.article_count.suffix" = "Makalu";
|
||||
"zim_file_missing_indicator.help" = "Fayil ɗin Zim ya ɓace.";
|
||||
// Fuzzy
|
||||
"library.zim_file_details.side_panel.message" = "Zabi fayil din zim dan ganin cikakken bayani";
|
||||
@ -78,7 +78,7 @@
|
||||
"zim_file_downloads.overlay.empty.message" = "Babu ayyukan zazzagewa";
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "Nuna ma'aunin gefe";
|
||||
"zim_file_new_overlay.empty" = "Babu sabon fayil ɗin Zim";
|
||||
"zim_file_new_button_refresh" = "Wartsake";
|
||||
"zim_file_new.button.refresh" = "Wartsake";
|
||||
"zim_file.list.name.text" = "Suna";
|
||||
"zim_file.list.description.text" = "Bayani";
|
||||
"zim_file.list.actions.text" = "Ayyuka";
|
||||
@ -188,7 +188,6 @@
|
||||
"app_macos_commands.open_file" = "Bude..";
|
||||
"app_macos_commands.new" = "Sabon shafi";
|
||||
"app_macos_navigation.button.library" = "Laburare";
|
||||
"app_macos_navigation.show_sidebar" = "Nuna ma'aunin gefe";
|
||||
"sidebar_view.navigation.button.close" = "Kulle";
|
||||
"sidebar_view.navigation.button.close_all" = "Rufe duk shafuka";
|
||||
"enum.category.wikipedia" = "Wikipedia";
|
||||
|
@ -32,7 +32,6 @@
|
||||
"common.tab.list.close" = "סגירת לשונית";
|
||||
"common.tab.menu.library" = "ספרייה";
|
||||
"common.tab.menu.settings" = "הגדרות";
|
||||
"common.support.app_name" = "תמיכה בפרויקט %@";
|
||||
"common.export_file.alert.title" = "יצוא קובץ";
|
||||
"common.export_file.alert.description" = "לייצא את הקובץ %@?";
|
||||
"common.export_file.alert.button.title" = "יצוא";
|
||||
@ -63,7 +62,7 @@
|
||||
"flavor_tag.help.mini" = "רק חלק מהטקסט זמין, כנראה הפרק הראשון";
|
||||
"library_refresh_time.last" = "זה עתה";
|
||||
"library_refresh_time.never" = "מעולם לא";
|
||||
"zim_file_cell_article_count_suffix" = "ערכים";
|
||||
"zim_file_cell.article_count.suffix" = "ערכים";
|
||||
"zim_file_missing_indicator.help" = "קובץ ה־zim חסר.";
|
||||
"library.zim_file_details.side_panel.message" = "נא לבחור קובץ ZIM כדי לראות פרטים";
|
||||
"library.zim_file_context.main_page.label" = "עמוד ראשי";
|
||||
@ -80,7 +79,7 @@
|
||||
"zim_file_downloads.overlay.empty.message" = "אין משימות הורדה";
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "הצגת סרגל צד";
|
||||
"zim_file_new_overlay.empty" = "אין קובץ ZIM חדש";
|
||||
"zim_file_new_button_refresh" = "רענון";
|
||||
"zim_file_new.button.refresh" = "רענון";
|
||||
"zim_file.list.name.text" = "שם";
|
||||
"zim_file.list.description.text" = "תיאור";
|
||||
"zim_file.list.actions.text" = "פעולות";
|
||||
@ -192,7 +191,6 @@
|
||||
"app_macos_commands.open_file" = "פתיחה...";
|
||||
"app_macos_commands.new" = "לשונית חדשה";
|
||||
"app_macos_navigation.button.library" = "ספרייה";
|
||||
"app_macos_navigation.show_sidebar" = "הצגת סרגל צד";
|
||||
"sidebar_view.navigation.button.close" = "סגירה";
|
||||
"sidebar_view.navigation.button.close_all" = "סגירת כל הלשוניות";
|
||||
"enum.category.wikipedia" = "ויקיפדיה";
|
||||
|
@ -26,7 +26,7 @@
|
||||
"library.zim_file_context.main_page.label" = "मुखपृष्ठ";
|
||||
"zim_file_opened.toolbar.open.title" = "खोलें...";
|
||||
"zim_file_category.title" = "श्रेणी";
|
||||
"zim_file_new_button_refresh" = "ताजा करें";
|
||||
"zim_file_new.button.refresh" = "ताजा करें";
|
||||
"zim_file.list.name.text" = "नाम";
|
||||
"zim_file.list.description.text" = "विवरण";
|
||||
"zim_file.list.actions.text" = "क्रियाएँ";
|
||||
|
@ -31,7 +31,6 @@
|
||||
"common.tab.list.close" = "Clauder scheda";
|
||||
"common.tab.menu.library" = "Bibliotheca";
|
||||
"common.tab.menu.settings" = "Parametros";
|
||||
"common.support.app_name" = "Appoiar %@";
|
||||
"common.export_file.alert.title" = "Exportar file";
|
||||
"common.export_file.alert.description" = "Vole tu exportar le file %@?";
|
||||
"common.export_file.alert.button.title" = "Exportar";
|
||||
@ -62,7 +61,7 @@
|
||||
"flavor_tag.help.mini" = "solmente un parte del texto es disponibile, probabilemente le prime section";
|
||||
"library_refresh_time.last" = "Justo ora";
|
||||
"library_refresh_time.never" = "Nunquam";
|
||||
"zim_file_cell_article_count_suffix" = "articulos";
|
||||
"zim_file_cell.article_count.suffix" = "articulos";
|
||||
"zim_file_missing_indicator.help" = "Le file ZIM manca.";
|
||||
"library.zim_file_details.side_panel.message" = "Selige un file ZIM pro vider detalios";
|
||||
"library.zim_file_context.main_page.label" = "Pagina principal";
|
||||
@ -79,7 +78,7 @@
|
||||
"zim_file_downloads.overlay.empty.message" = "Necun discargamento";
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "Monstrar barra lateral";
|
||||
"zim_file_new_overlay.empty" = "Necun nove file ZIM";
|
||||
"zim_file_new_button_refresh" = "Refrescar";
|
||||
"zim_file_new.button.refresh" = "Refrescar";
|
||||
"zim_file.list.name.text" = "Nomine";
|
||||
"zim_file.list.description.text" = "Description";
|
||||
"zim_file.list.actions.text" = "Actiones";
|
||||
@ -191,7 +190,6 @@
|
||||
"app_macos_commands.open_file" = "Aperir…";
|
||||
"app_macos_commands.new" = "Nove scheda";
|
||||
"app_macos_navigation.button.library" = "Bibliotheca";
|
||||
"app_macos_navigation.show_sidebar" = "Monstrar barra lateral";
|
||||
"sidebar_view.navigation.button.close" = "Clauder";
|
||||
"sidebar_view.navigation.button.close_all" = "Clauder tote le schedas";
|
||||
"enum.category.wikipedia" = "Wikipedia";
|
||||
|
@ -31,7 +31,6 @@
|
||||
"common.tab.list.close" = "Tutup Tab";
|
||||
"common.tab.menu.library" = "Perpustakaan";
|
||||
"common.tab.menu.settings" = "Pengaturan";
|
||||
"common.support.app_name" = "Dukung %@";
|
||||
"common.export_file.alert.title" = "Ekspor berkas";
|
||||
"common.export_file.alert.description" = "Apakah Anda ingin mengekspor berkas %@?";
|
||||
"common.export_file.alert.button.title" = "Ekspor";
|
||||
@ -62,7 +61,7 @@
|
||||
"flavor_tag.help.mini" = "hanya sebagian kecil teks yang tersedia, mungkin bagian pertama";
|
||||
"library_refresh_time.last" = "Baru Saja";
|
||||
"library_refresh_time.never" = "Tidak pernah";
|
||||
"zim_file_cell_article_count_suffix" = "artikel";
|
||||
"zim_file_cell.article_count.suffix" = "artikel";
|
||||
"zim_file_missing_indicator.help" = "Berkas Zim hilang.";
|
||||
"library.zim_file_details.side_panel.message" = "Pilih berkas ZIM untuk melihat detailnya";
|
||||
"library.zim_file_context.main_page.label" = "Halaman Utama";
|
||||
@ -79,7 +78,7 @@
|
||||
"zim_file_downloads.overlay.empty.message" = "Tidak ada tugas unduhan";
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "Tampilkan Bilah Sisi";
|
||||
"zim_file_new_overlay.empty" = "Tidak ada berkas ZIM baru";
|
||||
"zim_file_new_button_refresh" = "Muat ulang";
|
||||
"zim_file_new.button.refresh" = "Muat ulang";
|
||||
"zim_file.list.name.text" = "Nama";
|
||||
"zim_file.list.description.text" = "Deskripsi";
|
||||
"zim_file.list.actions.text" = "Tindakan";
|
||||
@ -191,7 +190,6 @@
|
||||
"app_macos_commands.open_file" = "Buka...";
|
||||
"app_macos_commands.new" = "Tab Baru";
|
||||
"app_macos_navigation.button.library" = "Perpustakaan";
|
||||
"app_macos_navigation.show_sidebar" = "Tampilkan Bilah Sisi";
|
||||
"sidebar_view.navigation.button.close" = "Tutup";
|
||||
"sidebar_view.navigation.button.close_all" = "Tutup Semua Tab";
|
||||
"enum.category.wikibooks" = "Wikibuku";
|
||||
|
@ -61,7 +61,7 @@
|
||||
"flavor_tag.help.mini" = "naanị obere akụkụ nke ederede dị, ma eleghị anya ngalaba nke mbụ";
|
||||
"library_refresh_time.last" = "Ugbu a";
|
||||
"library_refresh_time.never" = "Ọ dịghị mgbe";
|
||||
"zim_file_cell_article_count_suffix" = "ederede";
|
||||
"zim_file_cell.article_count.suffix" = "ederede";
|
||||
"zim_file_missing_indicator.help" = "Zim faịlụ na-efu efu.";
|
||||
// Fuzzy
|
||||
"library.zim_file_details.side_panel.message" = "Họrọ faịlụ zim ka ịhụ nkọwa ihe ndị ozọ";
|
||||
@ -82,7 +82,7 @@
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "Gosi akụkụ ngwa ọrụ";
|
||||
// Fuzzy
|
||||
"zim_file_new_overlay.empty" = "Enweghị zim faịlụ ọhụrụ";
|
||||
"zim_file_new_button_refresh" = "Tụnyegharia";
|
||||
"zim_file_new.button.refresh" = "Tụnyegharia";
|
||||
"zim_file.list.name.text" = "Aha";
|
||||
"zim_file.list.description.text" = "Nkọwa";
|
||||
"zim_file.list.actions.text" = "Omume ihe";
|
||||
@ -198,7 +198,6 @@
|
||||
"app_macos_commands.open_file" = "Mepee...";
|
||||
"app_macos_commands.new" = "Taabụ ọhụrụ";
|
||||
"app_macos_navigation.button.library" = "Ọ́bá Akwụkwọ";
|
||||
"app_macos_navigation.show_sidebar" = "Gosi Ogwe akụkụ";
|
||||
"sidebar_view.navigation.button.close" = "Mechie";
|
||||
"sidebar_view.navigation.button.close_all" = "Mechie taabụ niile";
|
||||
"enum.category.wikipedia" = "Wikipidịa";
|
||||
|
@ -42,7 +42,7 @@
|
||||
"zim_file_category.title" = "Categoria";
|
||||
"zim_file_category.section.empty.message" = "Nessun file ZIM in questa categoria.";
|
||||
"zim_file_new_overlay.empty" = "Nessun nuovo file ZIM";
|
||||
"zim_file_new_button_refresh" = "Aggiorna";
|
||||
"zim_file_new.button.refresh" = "Aggiorna";
|
||||
"zim_file.list.name.text" = "Nome";
|
||||
"zim_file.list.description.text" = "Descrizione";
|
||||
"zim_file.list.actions.text" = "Azioni";
|
||||
|
@ -33,7 +33,6 @@
|
||||
"common.tab.list.close" = "タブを閉じる";
|
||||
"common.tab.menu.library" = "ライブラリ";
|
||||
"common.tab.menu.settings" = "設定";
|
||||
"common.support.app_name" = "%@を支援";
|
||||
"common.export_file.alert.title" = "ファイルをエクスポート";
|
||||
"common.export_file.alert.description" = "ファイル%@をエクスポートしますか?";
|
||||
"common.export_file.alert.button.title" = "エクスポート";
|
||||
@ -64,7 +63,7 @@
|
||||
"flavor_tag.help.mini" = "文章の一部のみ(多くの場合最初の段落)が利用可能です。";
|
||||
"library_refresh_time.last" = "今すぐ";
|
||||
"library_refresh_time.never" = "なし";
|
||||
"zim_file_cell_article_count_suffix" = "記事";
|
||||
"zim_file_cell.article_count.suffix" = "記事";
|
||||
"zim_file_missing_indicator.help" = "ZIMファイルがありません。";
|
||||
"library.zim_file_details.side_panel.message" = "詳細を参照したいZIMファイルを選択";
|
||||
"library.zim_file_context.main_page.label" = "メインページ";
|
||||
@ -81,7 +80,7 @@
|
||||
"zim_file_downloads.overlay.empty.message" = "ダウンロード処理はありません";
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "サイドバーを表示";
|
||||
"zim_file_new_overlay.empty" = "新しいZIMファイルはありません";
|
||||
"zim_file_new_button_refresh" = "更新";
|
||||
"zim_file_new.button.refresh" = "更新";
|
||||
"zim_file.list.name.text" = "名前";
|
||||
"zim_file.list.description.text" = "概要";
|
||||
"zim_file.list.actions.text" = "操作";
|
||||
@ -191,7 +190,6 @@
|
||||
"app_macos_commands.open_file" = "開く...";
|
||||
"app_macos_commands.new" = "新規タブ";
|
||||
"app_macos_navigation.button.library" = "ライブラリ";
|
||||
"app_macos_navigation.show_sidebar" = "サイドバーを表示";
|
||||
"sidebar_view.navigation.button.close" = "閉じる";
|
||||
"sidebar_view.navigation.button.close_all" = "すべてのタブを閉じる";
|
||||
"enum.category.wikipedia" = "ウィキペディア";
|
||||
|
@ -32,7 +32,6 @@
|
||||
"common.tab.list.close" = "탭 닫기";
|
||||
"common.tab.menu.library" = "라이브러리";
|
||||
"common.tab.menu.settings" = "설정";
|
||||
"common.support.app_name" = "%@ 지원하기";
|
||||
"common.export_file.alert.title" = "파일 내보내기";
|
||||
"common.export_file.alert.description" = "%@ 파일을 내보내시겠습니까?";
|
||||
"common.export_file.alert.button.title" = "내보내기";
|
||||
@ -75,7 +74,7 @@
|
||||
"zim_file_downloads.overlay.empty.message" = "다운로드 작업 없음";
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "사이드바 표시";
|
||||
"zim_file_new_overlay.empty" = "새 ZIM 파일 없습니다";
|
||||
"zim_file_new_button_refresh" = "새로 고침";
|
||||
"zim_file_new.button.refresh" = "새로 고침";
|
||||
"zim_file.list.name.text" = "이름";
|
||||
"zim_file.list.description.text" = "설명";
|
||||
"zim_file.list.actions.text" = "동작";
|
||||
@ -178,7 +177,6 @@
|
||||
"app_macos_commands.open_file" = "열기...";
|
||||
"app_macos_commands.new" = "새 탭";
|
||||
"app_macos_navigation.button.library" = "라이브러리";
|
||||
"app_macos_navigation.show_sidebar" = "사이드바 표시";
|
||||
"sidebar_view.navigation.button.close" = "닫기";
|
||||
"sidebar_view.navigation.button.close_all" = "모든 탭 닫기";
|
||||
"enum.category.wikipedia" = "위키백과";
|
||||
|
@ -28,7 +28,6 @@
|
||||
"common.tab.list.close" = "Tab zoumaachen";
|
||||
"common.tab.menu.library" = "Bibliothéik";
|
||||
"common.tab.menu.settings" = "Astellungen";
|
||||
"common.support.app_name" = "%@ ënnerstëtzen";
|
||||
"common.export_file.alert.title" = "Fichier exportéieren";
|
||||
"common.export_file.alert.description" = "Wëllt Dir de Fichier %@ exportéieren?";
|
||||
"common.export_file.alert.button.title" = "Exportéieren";
|
||||
@ -52,7 +51,7 @@
|
||||
"flavor_tag.help.mini" = "nëmmen een Deel vum Text ass verfügbar, warscheinlech den éischten Abschnitt";
|
||||
"library_refresh_time.last" = "Elo just";
|
||||
"library_refresh_time.never" = "Ni";
|
||||
"zim_file_cell_article_count_suffix" = "Artikelen";
|
||||
"zim_file_cell.article_count.suffix" = "Artikelen";
|
||||
"library.zim_file_context.main_page.label" = "Haaptsäit";
|
||||
"library.zim_file_context.random.label" = "Zoufälleg Säit";
|
||||
"library.zim_file_context.copy_url" = "URL kopéieren";
|
||||
@ -62,7 +61,7 @@
|
||||
"zim_file_category.title" = "Kategorie";
|
||||
"zim_file_category.section.empty.message" = "Keen ZIM-Fichier an dëser Kategorie.";
|
||||
"zim_file_new_overlay.empty" = "Keng nei ZIM-Datei";
|
||||
"zim_file_new_button_refresh" = "Aktualiséieren";
|
||||
"zim_file_new.button.refresh" = "Aktualiséieren";
|
||||
"zim_file.list.name.text" = "Numm";
|
||||
"zim_file.list.description.text" = "Beschreiwung";
|
||||
"zim_file.list.actions.text" = "Aktiounen";
|
||||
|
@ -31,7 +31,6 @@
|
||||
"common.tab.list.close" = "Затвори јазиче";
|
||||
"common.tab.menu.library" = "Библиотека";
|
||||
"common.tab.menu.settings" = "Нагодувања";
|
||||
"common.support.app_name" = "Поддржете го %@";
|
||||
"common.export_file.alert.title" = "Извези податотека";
|
||||
"common.export_file.alert.description" = "Дали сакате да ја извезете податотеката %@?";
|
||||
"common.export_file.alert.button.title" = "Извези";
|
||||
@ -62,7 +61,7 @@
|
||||
"flavor_tag.help.mini" = "достапен е само дел од текстот, веројатно првиот";
|
||||
"library_refresh_time.last" = "Штотуку";
|
||||
"library_refresh_time.never" = "Никогаш";
|
||||
"zim_file_cell_article_count_suffix" = "статии";
|
||||
"zim_file_cell.article_count.suffix" = "статии";
|
||||
"zim_file_missing_indicator.help" = "ZIM-податотеката недостасува.";
|
||||
"library.zim_file_details.side_panel.message" = "Изберете ZIM-податотека за да ги видите поединостите";
|
||||
"library.zim_file_context.main_page.label" = "Главна страница";
|
||||
@ -79,7 +78,7 @@
|
||||
"zim_file_downloads.overlay.empty.message" = "Нема задачи за преземање";
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "Прикажи страничник";
|
||||
"zim_file_new_overlay.empty" = "Нема нова ZIM-податотека";
|
||||
"zim_file_new_button_refresh" = "Превчитај";
|
||||
"zim_file_new.button.refresh" = "Превчитај";
|
||||
"zim_file.list.name.text" = "Име";
|
||||
"zim_file.list.description.text" = "Опис";
|
||||
"zim_file.list.actions.text" = "Дејства";
|
||||
@ -191,7 +190,6 @@
|
||||
"app_macos_commands.open_file" = "Отвори...";
|
||||
"app_macos_commands.new" = "Ново јазиче";
|
||||
"app_macos_navigation.button.library" = "Библиотека";
|
||||
"app_macos_navigation.show_sidebar" = "Прикажи страничник";
|
||||
"sidebar_view.navigation.button.close" = "Затвори";
|
||||
"sidebar_view.navigation.button.close_all" = "Затвори ги сите јазичиња";
|
||||
"enum.category.wikipedia" = "Википедија";
|
||||
|
@ -25,7 +25,6 @@
|
||||
"common.tab.list.close" = "Zamknij zakładkę";
|
||||
"common.tab.menu.library" = "Biblioteka";
|
||||
"common.tab.menu.settings" = "Ustawienia";
|
||||
"common.support.app_name" = "Wsparcie %@";
|
||||
"common.export_file.alert.title" = "Eksportuj plik";
|
||||
"common.export_file.alert.button.title" = "Eksportuj";
|
||||
"bookmark_context_menu.view.title" = "Podgląd";
|
||||
@ -42,7 +41,7 @@
|
||||
"flavor_tag.help.mini" = "dostępny jest tylko podzbiór tekstu, prawdopodobnie pierwsza sekcja";
|
||||
"library_refresh_time.last" = "Dopiero co";
|
||||
"library_refresh_time.never" = "Nigdy";
|
||||
"zim_file_cell_article_count_suffix" = "artykuły";
|
||||
"zim_file_cell.article_count.suffix" = "artykuły";
|
||||
"zim_file_missing_indicator.help" = "Brak pliku Zim.";
|
||||
// Fuzzy
|
||||
"library.zim_file_details.side_panel.message" = "Wybierz plik zim, aby zobaczyć szczegóły";
|
||||
@ -56,7 +55,7 @@
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "Pokaż pasek boczny";
|
||||
// Fuzzy
|
||||
"zim_file_new_overlay.empty" = "Brak nowego pliku zim";
|
||||
"zim_file_new_button_refresh" = "Odśwież";
|
||||
"zim_file_new.button.refresh" = "Odśwież";
|
||||
"zim_file.list.name.text" = "Nazwa";
|
||||
"zim_file.list.description.text" = "Opis";
|
||||
"zim_file.action.delete.title" = "Usuń";
|
||||
@ -144,7 +143,6 @@
|
||||
"comments.button.zoom_out" = "Oddal";
|
||||
"app_macos_commands.new" = "Nowa zakładka";
|
||||
"app_macos_navigation.button.library" = "Biblioteka";
|
||||
"app_macos_navigation.show_sidebar" = "Pokaż pasek boczny";
|
||||
"sidebar_view.navigation.button.close" = "Zamknij";
|
||||
"sidebar_view.navigation.button.close_all" = "Zamknij wszystkie zakładki";
|
||||
"enum.category.other" = "Inne";
|
||||
|
@ -31,7 +31,6 @@
|
||||
"common.tab.list.close" = "Fechar Guia";
|
||||
"common.tab.menu.library" = "Biblioteca";
|
||||
"common.tab.menu.settings" = "Configurações";
|
||||
"common.support.app_name" = "Apoie %@";
|
||||
"common.export_file.alert.title" = "Exportar arquivo";
|
||||
"common.export_file.alert.description" = "Você deseja exportar o arquivo %@?";
|
||||
"common.export_file.alert.button.title" = "Exportar";
|
||||
@ -50,7 +49,7 @@
|
||||
"download_task_cell.status.downloading" = "Baixando...";
|
||||
"download_task_cell.status.paused" = "Pausado";
|
||||
"library_refresh_time.never" = "Nunca";
|
||||
"zim_file_cell_article_count_suffix" = "artigos";
|
||||
"zim_file_cell.article_count.suffix" = "artigos";
|
||||
"zim_file_missing_indicator.help" = "Está faltando o arquivo zim.";
|
||||
"library.zim_file_details.side_panel.message" = "Selecione um arquivo ZIM para ver mais detalhes";
|
||||
"library.zim_file_context.main_page.label" = "Página principal";
|
||||
@ -60,6 +59,6 @@
|
||||
"zim_file_opened.toolbar.open.title" = "Abrir...";
|
||||
"zim_file_opened.toolbar.open.help" = "Abrir arquivo ZIM";
|
||||
"zim_file_category.title" = "Categoria";
|
||||
"zim_file_new_button_refresh" = "Atualizar";
|
||||
"zim_file_new.button.refresh" = "Atualizar";
|
||||
"zim_file.list.name.text" = "Nome";
|
||||
"zim_file.list.description.text" = "Descrição";
|
||||
|
@ -29,7 +29,6 @@
|
||||
"common.tab.list.close" = "Accessibility label for button to close the current tab";
|
||||
"common.tab.menu.library" = "On iPad it is a sidemenu title grouping library/ZIM file related buttons. Library: Opened | Categories | Downloads | New";
|
||||
"common.tab.menu.settings" = "On iPad it is a sidemenu title leading to application settings page";
|
||||
"common.support.app_name" = "Button title, opening the external browser to support the app. The App Name being the argument, eg: Support Kiwix";
|
||||
"outline_button.outline.title" = "Button label on macOS for topbar browser button";
|
||||
"outline_button.outline.help" = "Accessibility label on macOS for topbar browser button";
|
||||
"outline_button.outline.empty.message" = "Title within an overlay menu, when there's no outline available for the current article loaded";
|
||||
@ -57,7 +56,7 @@
|
||||
"flavor_tag.help.mini" = "Accessibility label for ZIM file results, explaining the different flavours of the same ZIM file (mini|max|nopic)";
|
||||
"library_refresh_time.last" = "Just Now";
|
||||
"library_refresh_time.never" = "Never";
|
||||
"zim_file_cell_article_count_suffix" = "Part of the ZIM file description, when we list ZIM files (as card results), eg: '246K articles', the word articles is added after the number";
|
||||
"zim_file_cell.article_count.suffix" = "Part of the ZIM file description, when we list ZIM files (as card results), eg: '246K articles', the word articles is added after the number";
|
||||
"zim_file_missing_indicator.help" = "Accessibility label for a warning (!) icon";
|
||||
"library.zim_file_details.side_panel.message" = "Default placeholder text for side panel on macOS, when no file is selected.";
|
||||
"library.zim_file_context.main_page.label" = "Supplementary action title, when long pressing on a ZIM file";
|
||||
@ -74,7 +73,7 @@
|
||||
"zim_file_downloads.overlay.empty.message" = "Fallback text for center panel, when downloads are selected from the side menu.";
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "Accessibility label for side bar toggle button";
|
||||
"zim_file_new_overlay.empty" = "Fallback text for listing new ZIM files available for download";
|
||||
"zim_file_new_button_refresh" = "Accessibility label for refresh button on the top nav bar to refresh the list of new ZIM files";
|
||||
"zim_file_new.button.refresh" = "Accessibility label for refresh button on the top nav bar to refresh the list of new ZIM files";
|
||||
"zim_file.list.name.text" = "Title for displaying the details of a ZIM file";
|
||||
"zim_file.list.description.text" = "Title for displaying the details of a ZIM file";
|
||||
"zim_file.list.actions.text" = "Title for displaying the possible actions to a selected ZIM file. Eg. The 'Download' button is below this.";
|
||||
@ -184,7 +183,6 @@
|
||||
"app_macos_commands.open_file" = "MacOS command menu item";
|
||||
"app_macos_commands.new" = "MacOS command menu item";
|
||||
"app_macos_navigation.button.library" = "MacOS command menu item";
|
||||
"app_macos_navigation.show_sidebar" = "MacOS command menu item";
|
||||
"sidebar_view.navigation.button.close" = "Accessiblity title for navigation button icon";
|
||||
"sidebar_view.navigation.button.close_all" = "Accessiblity title for navigation button icon";
|
||||
"enum.category.wikipedia" = "{{Optional}}";
|
||||
|
@ -37,7 +37,6 @@
|
||||
"common.tab.list.close" = "Закрыть вкладку";
|
||||
"common.tab.menu.library" = "Библиотека";
|
||||
"common.tab.menu.settings" = "Настройки";
|
||||
"common.support.app_name" = "Справка %@";
|
||||
"common.export_file.alert.title" = "Экспорт файла";
|
||||
"common.export_file.alert.description" = "Вы хотите экспортировать файл %@?";
|
||||
"common.export_file.alert.button.title" = "Экспорт";
|
||||
@ -68,7 +67,7 @@
|
||||
"flavor_tag.help.mini" = "доступна только часть текста, вероятно, первый раздел";
|
||||
"library_refresh_time.last" = "Прямо сейчас";
|
||||
"library_refresh_time.never" = "Никогда";
|
||||
"zim_file_cell_article_count_suffix" = "статей";
|
||||
"zim_file_cell.article_count.suffix" = "статей";
|
||||
"zim_file_missing_indicator.help" = "Zim-файл отсутствует.";
|
||||
"library.zim_file_details.side_panel.message" = "Выберите ZIM-файл, чтобы просмотреть подробности.";
|
||||
"library.zim_file_context.main_page.label" = "Заглавная страница";
|
||||
@ -85,7 +84,7 @@
|
||||
"zim_file_downloads.overlay.empty.message" = "Нет задач по загрузке";
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "Показать боковую панель";
|
||||
"zim_file_new_overlay.empty" = "Нет нового ZIM-файла";
|
||||
"zim_file_new_button_refresh" = "Обновить";
|
||||
"zim_file_new.button.refresh" = "Обновить";
|
||||
"zim_file.list.name.text" = "Имя";
|
||||
"zim_file.list.description.text" = "Описание";
|
||||
"zim_file.list.actions.text" = "Действия";
|
||||
@ -196,7 +195,6 @@
|
||||
"app_macos_commands.open_file" = "Открыть...";
|
||||
"app_macos_commands.new" = "Новая вкладка";
|
||||
"app_macos_navigation.button.library" = "Библиотека";
|
||||
"app_macos_navigation.show_sidebar" = "Показать боковую панель";
|
||||
"sidebar_view.navigation.button.close" = "Закрыть";
|
||||
"sidebar_view.navigation.button.close_all" = "Закрыть все вкладки";
|
||||
"enum.category.wikipedia" = "Википедия";
|
||||
|
@ -29,7 +29,7 @@
|
||||
"download_task_cell.status.failed" = "Ii lihkostuvvan";
|
||||
"library_refresh_time.last" = "Juste dal";
|
||||
"library_refresh_time.never" = "Ii goassige";
|
||||
"zim_file_cell_article_count_suffix" = "artihkkala";
|
||||
"zim_file_cell.article_count.suffix" = "artihkkala";
|
||||
"zim_file_missing_indicator.help" = "ZIM-fiila váilu.";
|
||||
"library.zim_file_context.main_page.label" = "Váldosiidu";
|
||||
"library.zim_file_context.random.label" = "Summalis siidu";
|
||||
|
@ -33,11 +33,11 @@
|
||||
"download_task_cell.status.paused" = "جمب ڳیا";
|
||||
"library_refresh_time.last" = "ہُݨے ہُݨے";
|
||||
"library_refresh_time.never" = "کݙاہیں وی کائناں";
|
||||
"zim_file_cell_article_count_suffix" = "مضمون";
|
||||
"zim_file_cell.article_count.suffix" = "مضمون";
|
||||
"library.zim_file_context.main_page.label" = "پہلا پرت";
|
||||
"zim_file_opened.toolbar.open.title" = "کھولو۔۔۔";
|
||||
"zim_file_category.title" = "ونکی";
|
||||
"zim_file_new_button_refresh" = "تازہ کرو";
|
||||
"zim_file_new.button.refresh" = "تازہ کرو";
|
||||
"zim_file.list.name.text" = "ناں";
|
||||
"zim_file.list.description.text" = "تفصیل";
|
||||
"zim_file.list.actions.text" = "عمل";
|
||||
|
@ -56,7 +56,7 @@
|
||||
"flavor_tag.help.mini" = "na voljo je samo del besedila, verjetno prvi razdelek";
|
||||
"library_refresh_time.last" = "Pravkar";
|
||||
"library_refresh_time.never" = "Nikoli";
|
||||
"zim_file_cell_article_count_suffix" = "članki";
|
||||
"zim_file_cell.article_count.suffix" = "članki";
|
||||
"zim_file_missing_indicator.help" = "Datoteka Zim manjka.";
|
||||
// Fuzzy
|
||||
"library.zim_file_details.side_panel.message" = "Izberite datoteko ZIM za ogled podrobnosti";
|
||||
@ -74,7 +74,7 @@
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "Prikaži stransko vrstico";
|
||||
// Fuzzy
|
||||
"zim_file_new_overlay.empty" = "Ni novih datotek ZIM";
|
||||
"zim_file_new_button_refresh" = "Osveži";
|
||||
"zim_file_new.button.refresh" = "Osveži";
|
||||
"zim_file.list.name.text" = "Ime";
|
||||
"zim_file.list.description.text" = "Opis";
|
||||
"zim_file.list.actions.text" = "Dejanja";
|
||||
@ -186,7 +186,6 @@
|
||||
"app_macos_commands.open_file" = "Odpri ...";
|
||||
"app_macos_commands.new" = "Nov zavihek";
|
||||
"app_macos_navigation.button.library" = "Knjižnica";
|
||||
"app_macos_navigation.show_sidebar" = "Prikaži stransko vrstico";
|
||||
"sidebar_view.navigation.button.close" = "Zapri";
|
||||
"sidebar_view.navigation.button.close_all" = "Zapri vse zavihke";
|
||||
"enum.category.wikipedia" = "Wikipedija";
|
||||
|
@ -31,7 +31,6 @@
|
||||
"common.tab.list.close" = "Mbylle Skedën";
|
||||
"common.tab.menu.library" = "Bibliotekë";
|
||||
"common.tab.menu.settings" = "Rregullime";
|
||||
"common.support.app_name" = "Përkrahni %@";
|
||||
"common.export_file.alert.title" = "Eksportoni kartelë";
|
||||
"common.export_file.alert.description" = "Doni të eksportohet kartela %@?";
|
||||
"common.export_file.alert.button.title" = "Eksportoje";
|
||||
@ -62,7 +61,7 @@
|
||||
"flavor_tag.help.mini" = "është i gatshëm vetëm një nëngrup i tekstit, me gjasa ndarja e parë";
|
||||
"library_refresh_time.last" = "Mu Tani";
|
||||
"library_refresh_time.never" = "Kurrë";
|
||||
"zim_file_cell_article_count_suffix" = "artikuj";
|
||||
"zim_file_cell.article_count.suffix" = "artikuj";
|
||||
"zim_file_missing_indicator.help" = "Mungon kartelë ZIM.";
|
||||
"library.zim_file_details.side_panel.message" = "Që të shihni hollësi, përzgjidhni një kartelë ZIM";
|
||||
"library.zim_file_context.main_page.label" = "Faqja Kryesore";
|
||||
@ -79,7 +78,7 @@
|
||||
"zim_file_downloads.overlay.empty.message" = "S’ka akte shkarkimi";
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "Shfaq Anështyllë";
|
||||
"zim_file_new_overlay.empty" = "Pa kartelë të re ZIM";
|
||||
"zim_file_new_button_refresh" = "Rifreskoje";
|
||||
"zim_file_new.button.refresh" = "Rifreskoje";
|
||||
"zim_file.list.name.text" = "Emër";
|
||||
"zim_file.list.description.text" = "Përshkrim";
|
||||
"zim_file.list.actions.text" = "Veprime";
|
||||
@ -189,7 +188,6 @@
|
||||
"app_macos_commands.open_file" = "Hapni…";
|
||||
"app_macos_commands.new" = "Skedë e Re";
|
||||
"app_macos_navigation.button.library" = "Bibliotekë";
|
||||
"app_macos_navigation.show_sidebar" = "Shfaq Anështyllë";
|
||||
"sidebar_view.navigation.button.close" = "Mbylle";
|
||||
"sidebar_view.navigation.button.close_all" = "Mbylli Krejt Skedat";
|
||||
"enum.category.wikipedia" = "Wikipedia";
|
||||
|
@ -32,7 +32,6 @@
|
||||
"common.tab.list.close" = "Stäng flik";
|
||||
"common.tab.menu.library" = "Bibliotek";
|
||||
"common.tab.menu.settings" = "Inställningar";
|
||||
"common.support.app_name" = "Stöd %@";
|
||||
"common.export_file.alert.title" = "Exportera fil";
|
||||
"common.export_file.alert.description" = "Vill du exportera filen %@?";
|
||||
"common.export_file.alert.button.title" = "Exportera";
|
||||
@ -64,7 +63,7 @@
|
||||
"flavor_tag.help.mini" = "endast en delmängd av texten är tillgänglig, förmodligen det första avsnittet";
|
||||
"library_refresh_time.last" = "Alldeles nyss";
|
||||
"library_refresh_time.never" = "Aldrig";
|
||||
"zim_file_cell_article_count_suffix" = "artiklar";
|
||||
"zim_file_cell.article_count.suffix" = "artiklar";
|
||||
"zim_file_missing_indicator.help" = "Zim-fil saknas.";
|
||||
"library.zim_file_details.side_panel.message" = "Välj en ZIM-fil för att se information";
|
||||
"library.zim_file_context.main_page.label" = "Huvudsida";
|
||||
@ -80,7 +79,7 @@
|
||||
"zim_file_downloads.overlay.empty.message" = "Inga nedladdningsuppgifter";
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "Visa sidofält";
|
||||
"zim_file_new_overlay.empty" = "Ingen ny ZIM-fil";
|
||||
"zim_file_new_button_refresh" = "Uppdatera";
|
||||
"zim_file_new.button.refresh" = "Uppdatera";
|
||||
"zim_file.list.name.text" = "Namn";
|
||||
"zim_file.list.description.text" = "Beskrivning";
|
||||
"zim_file.list.actions.text" = "Åtgärder";
|
||||
@ -190,7 +189,6 @@
|
||||
"app_macos_commands.open_file" = "Öppna...";
|
||||
"app_macos_commands.new" = "Ny flik";
|
||||
"app_macos_navigation.button.library" = "Bibliotek";
|
||||
"app_macos_navigation.show_sidebar" = "Visa sidofält";
|
||||
"sidebar_view.navigation.button.close" = "Stäng";
|
||||
"sidebar_view.navigation.button.close_all" = "Stäng alla flikar";
|
||||
"enum.category.wikipedia" = "Wikipedia";
|
||||
|
@ -57,7 +57,7 @@
|
||||
"flavor_tag.help.mini" = "metnin yalnızca bir alt kümesi mevcut, muhtemelen ilk bölüm";
|
||||
"library_refresh_time.last" = "Şu anda";
|
||||
"library_refresh_time.never" = "Asla";
|
||||
"zim_file_cell_article_count_suffix" = "makale";
|
||||
"zim_file_cell.article_count.suffix" = "makale";
|
||||
"zim_file_missing_indicator.help" = "Zim dosyası eksik.";
|
||||
// Fuzzy
|
||||
"library.zim_file_details.side_panel.message" = "Ayrıntıları görmek için bir zim dosyası seçin";
|
||||
@ -78,7 +78,7 @@
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "Kenar Çubuğunu Göster";
|
||||
// Fuzzy
|
||||
"zim_file_new_overlay.empty" = "Yeni zim dosyası yok";
|
||||
"zim_file_new_button_refresh" = "Yenile";
|
||||
"zim_file_new.button.refresh" = "Yenile";
|
||||
"zim_file.list.name.text" = "Ad";
|
||||
"zim_file.list.description.text" = "Açıklama";
|
||||
"zim_file.list.actions.text" = "Eylemler";
|
||||
@ -194,7 +194,6 @@
|
||||
"app_macos_commands.open_file" = "Aç...";
|
||||
"app_macos_commands.new" = "Yeni Sekme";
|
||||
"app_macos_navigation.button.library" = "Kütüphane";
|
||||
"app_macos_navigation.show_sidebar" = "Kenar Çubuğunu Göster";
|
||||
"sidebar_view.navigation.button.close" = "Kapat";
|
||||
"sidebar_view.navigation.button.close_all" = "Tüm Sekmeleri Kapat";
|
||||
"enum.category.wikipedia" = "Vikipedi";
|
||||
|
@ -31,7 +31,6 @@
|
||||
"common.tab.list.close" = "Закрити вкладку";
|
||||
"common.tab.menu.library" = "Бібліотека";
|
||||
"common.tab.menu.settings" = "Налаштування";
|
||||
"common.support.app_name" = "Підтримайте %@";
|
||||
"common.export_file.alert.title" = "Експортувати файл";
|
||||
"common.export_file.alert.description" = "Ви бажаєте експортувати файл %@?";
|
||||
"common.export_file.alert.button.title" = "Експортувати";
|
||||
@ -58,7 +57,7 @@
|
||||
"flavor_tag.help.no_pic" = "більшість зображень було видалено";
|
||||
"library_refresh_time.last" = "Щойно";
|
||||
"library_refresh_time.never" = "Ніколи";
|
||||
"zim_file_cell_article_count_suffix" = "статей";
|
||||
"zim_file_cell.article_count.suffix" = "статей";
|
||||
"zim_file_missing_indicator.help" = "Файл Zim відсутній.";
|
||||
"library.zim_file_details.side_panel.message" = "Оберіть файл ZIM, щоб побачити деталі";
|
||||
"library.zim_file_context.main_page.label" = "Головна сторінка";
|
||||
@ -73,7 +72,7 @@
|
||||
"zim_file_category.section.empty.message" = "У цій категорії немає файлу ZIM.";
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "Показати бічну панель";
|
||||
"zim_file_new_overlay.empty" = "Немає нового файлу ZIM";
|
||||
"zim_file_new_button_refresh" = "Оновити";
|
||||
"zim_file_new.button.refresh" = "Оновити";
|
||||
"zim_file.list.name.text" = "Назва";
|
||||
"zim_file.list.description.text" = "Опис";
|
||||
"zim_file.list.actions.text" = "Дії";
|
||||
@ -179,7 +178,6 @@
|
||||
"app_macos_commands.open_file" = "Відкрити...";
|
||||
"app_macos_commands.new" = "Нова вкладка";
|
||||
"app_macos_navigation.button.library" = "Бібліотека";
|
||||
"app_macos_navigation.show_sidebar" = "Показати бічну панель";
|
||||
"sidebar_view.navigation.button.close" = "Закрити";
|
||||
"sidebar_view.navigation.button.close_all" = "Закрити всі вкладки";
|
||||
"enum.category.wikipedia" = "Вікіпедія";
|
||||
|
@ -36,7 +36,6 @@
|
||||
"common.tab.list.close" = "关闭标签页";
|
||||
"common.tab.menu.library" = "图书馆";
|
||||
"common.tab.menu.settings" = "设置";
|
||||
"common.support.app_name" = "支持 %@";
|
||||
"common.export_file.alert.title" = "导出文件";
|
||||
"common.export_file.alert.description" = "您真的想导出文件 %@ 吗?";
|
||||
"common.export_file.alert.button.title" = "导出";
|
||||
@ -67,7 +66,7 @@
|
||||
"flavor_tag.help.mini" = "仅有部分文本可用,这可能是第一部分";
|
||||
"library_refresh_time.last" = "刚刚";
|
||||
"library_refresh_time.never" = "从不";
|
||||
"zim_file_cell_article_count_suffix" = "条目";
|
||||
"zim_file_cell.article_count.suffix" = "条目";
|
||||
"zim_file_missing_indicator.help" = "Zim 文件丢失";
|
||||
"library.zim_file_details.side_panel.message" = "选择一个 ZIM 文件以查看详细信息";
|
||||
"library.zim_file_context.main_page.label" = "首页";
|
||||
@ -84,7 +83,7 @@
|
||||
"zim_file_downloads.overlay.empty.message" = "没有下载任务";
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "显示侧边栏";
|
||||
"zim_file_new_overlay.empty" = "没有新的 ZIM 文件";
|
||||
"zim_file_new_button_refresh" = "刷新";
|
||||
"zim_file_new.button.refresh" = "刷新";
|
||||
"zim_file.list.name.text" = "名称";
|
||||
"zim_file.list.description.text" = "描述";
|
||||
"zim_file.list.actions.text" = "操作";
|
||||
@ -196,7 +195,6 @@
|
||||
"app_macos_commands.open_file" = "打开...";
|
||||
"app_macos_commands.new" = "新建标签页";
|
||||
"app_macos_navigation.button.library" = "图书馆";
|
||||
"app_macos_navigation.show_sidebar" = "显示侧边栏";
|
||||
"sidebar_view.navigation.button.close" = "关闭";
|
||||
"sidebar_view.navigation.button.close_all" = "关闭所有标签页";
|
||||
"enum.category.wikipedia" = "维基百科";
|
||||
|
@ -32,7 +32,6 @@
|
||||
"common.tab.list.close" = "關閉分頁";
|
||||
"common.tab.menu.library" = "圖書館";
|
||||
"common.tab.menu.settings" = "設定";
|
||||
"common.support.app_name" = "支援 %@";
|
||||
"common.export_file.alert.title" = "匯出檔案";
|
||||
"common.export_file.alert.description" = "您要匯出檔案「%@」嗎?";
|
||||
"common.export_file.alert.button.title" = "匯出";
|
||||
@ -63,7 +62,7 @@
|
||||
"flavor_tag.help.mini" = "僅有文字的子集合可用,有可能是第一段落";
|
||||
"library_refresh_time.last" = "現在";
|
||||
"library_refresh_time.never" = "永不";
|
||||
"zim_file_cell_article_count_suffix" = "條目";
|
||||
"zim_file_cell.article_count.suffix" = "條目";
|
||||
"zim_file_missing_indicator.help" = "遺失 Zim 檔案。";
|
||||
"library.zim_file_details.side_panel.message" = "選擇一個 ZIM 檔案以查看詳細資訊";
|
||||
"library.zim_file_context.main_page.label" = "主頁";
|
||||
@ -80,7 +79,7 @@
|
||||
"zim_file_downloads.overlay.empty.message" = "沒有下載任務";
|
||||
"zim_file_downloads.toolbar.show_sidebar.label" = "顯示側邊欄";
|
||||
"zim_file_new_overlay.empty" = "沒有新的 ZIM 檔案";
|
||||
"zim_file_new_button_refresh" = "重整";
|
||||
"zim_file_new.button.refresh" = "重整";
|
||||
"zim_file.list.name.text" = "名稱";
|
||||
"zim_file.list.description.text" = "描述";
|
||||
"zim_file.list.actions.text" = "操作";
|
||||
@ -192,7 +191,6 @@
|
||||
"app_macos_commands.open_file" = "開啟…";
|
||||
"app_macos_commands.new" = "新分頁";
|
||||
"app_macos_navigation.button.library" = "圖書館";
|
||||
"app_macos_navigation.show_sidebar" = "顯示側邊欄";
|
||||
"sidebar_view.navigation.button.close" = "關閉";
|
||||
"sidebar_view.navigation.button.close_all" = "關閉所有分頁";
|
||||
"enum.category.wikipedia" = "維基百科";
|
||||
|
@ -194,7 +194,7 @@ enum LibraryTabItem: String, CaseIterable, Identifiable {
|
||||
var name: String {
|
||||
switch self {
|
||||
case .opened:
|
||||
return LocalString.enum_libray_tab_item_opened.localized
|
||||
return LocalString.enum_libray_tab_item_opened
|
||||
case .categories:
|
||||
return LocalString.enum_libray_tab_item_categories
|
||||
case .downloads:
|
||||
@ -231,7 +231,7 @@ enum NavigationItem: Hashable, Identifiable {
|
||||
case .loading:
|
||||
return LocalString.enum_navigation_item_loading
|
||||
case .bookmarks:
|
||||
return LocalString.enum_navigation_item_bookmarks.localized
|
||||
return LocalString.enum_navigation_item_bookmarks
|
||||
case .map:
|
||||
return LocalString.enum_navigation_item_map
|
||||
case .tab:
|
||||
@ -243,7 +243,7 @@ enum NavigationItem: Hashable, Identifiable {
|
||||
case .opened:
|
||||
return LocalString.enum_navigation_item_opened
|
||||
case .categories:
|
||||
return LocalString.enum_navigation_item_categories.localized
|
||||
return LocalString.enum_navigation_item_categories
|
||||
case .new:
|
||||
return LocalString.enum_navigation_item_new
|
||||
case .downloads:
|
||||
|
@ -218,7 +218,7 @@ struct ZimFileDetail: View {
|
||||
@ViewBuilder
|
||||
var boolInfo: some View {
|
||||
AttributeBool(title: LocalString.zim_file_bool_info_pictures, detail: zimFile.hasPictures)
|
||||
AttributeBool(title: "zim_file.bool_info.videos".localized, detail: zimFile.hasVideos)
|
||||
AttributeBool(title: LocalString.zim_file_bool_info_videos, detail: zimFile.hasVideos)
|
||||
AttributeBool(title: LocalString.zim_file_bool_info_details, detail: zimFile.hasDetails)
|
||||
if zimFile.requiresServiceWorkers {
|
||||
AttributeBool(title: LocalString.zim_file_bool_info_require_service_workers,
|
||||
@ -229,7 +229,7 @@ struct ZimFileDetail: View {
|
||||
@ViewBuilder
|
||||
var counts: some View {
|
||||
Attribute(
|
||||
title: LocalString.zim_file_counts_article_count.localized,
|
||||
title: LocalString.zim_file_counts_article_count,
|
||||
detail: Formatter.number.string(from: NSNumber(value: zimFile.articleCount))
|
||||
)
|
||||
Attribute(
|
||||
@ -240,7 +240,7 @@ struct ZimFileDetail: View {
|
||||
|
||||
@ViewBuilder
|
||||
var id: some View {
|
||||
Attribute(title: LocalString.zim_file_detail_id_title.localized, detail: String(zimFile.fileID.uuidString.prefix(8)))
|
||||
Attribute(title: LocalString.zim_file_detail_id_title, detail: String(zimFile.fileID.uuidString.prefix(8)))
|
||||
}
|
||||
|
||||
private var freeSpace: Int64? {
|
||||
@ -289,7 +289,7 @@ private struct DownloadTaskDetail: View {
|
||||
Action(title: LocalString.zim_file_download_task_action_pause) {
|
||||
DownloadService.shared.pause(zimFileID: downloadZimFile.fileID)
|
||||
}
|
||||
Attribute(title: LocalString.zim_file_download_task_action_downloading.localized, detail: detail)
|
||||
Attribute(title: LocalString.zim_file_download_task_action_downloading, detail: detail)
|
||||
} else {
|
||||
Action(title: LocalString.zim_file_download_task_action_resume) {
|
||||
DownloadService.shared.resume(zimFileID: downloadZimFile.fileID)
|
||||
|
@ -98,12 +98,12 @@ struct About: View {
|
||||
}
|
||||
|
||||
private var appVersion: some View {
|
||||
Attribute(title: LocalString.settings_about_appverion_title.localized,
|
||||
Attribute(title: LocalString.settings_about_appverion_title,
|
||||
detail: Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String)
|
||||
}
|
||||
|
||||
private var buildNumber: some View {
|
||||
Attribute(title: LocalString.settings_about_build_title.localized,
|
||||
Attribute(title: LocalString.settings_about_build_title,
|
||||
detail: Bundle.main.infoDictionary?["CFBundleVersion"] as? String)
|
||||
}
|
||||
|
||||
|
@ -245,7 +245,7 @@ struct Settings: View {
|
||||
": \(Formatter.percent.string(from: NSNumber(value: webViewPageZoom)) ?? "")")
|
||||
}
|
||||
if FeatureFlags.showExternalLinkOptionInSettings {
|
||||
Picker(LocalString.reading_settings_external_link_title.localized, selection: $externalLinkLoadingPolicy) {
|
||||
Picker(LocalString.reading_settings_external_link_title, selection: $externalLinkLoadingPolicy) {
|
||||
ForEach(ExternalLinkLoadingPolicy.allCases) { loadingPolicy in
|
||||
Text(loadingPolicy.name).tag(loadingPolicy)
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ struct OpenFileButton<Label: View>: View {
|
||||
guard case let .success(urls) = result else { return }
|
||||
NotificationCenter.openFiles(urls, context: context)
|
||||
}
|
||||
.help("import-open-zim-file".localized)
|
||||
.help(LocalString.common_dialog_button_open)
|
||||
.keyboardShortcut("o")
|
||||
}
|
||||
}
|
||||
|
@ -4,31 +4,41 @@ import re
|
||||
import glob
|
||||
from pathlib import Path
|
||||
|
||||
# example usage:
|
||||
# python localizations.py Support/en.lproj/Localizable.strings generate
|
||||
# example usages:
|
||||
# python localizations.py generate
|
||||
# python localizations.py validate
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('input_file', type=argparse.FileType('r'), nargs=1, help='Localizable.strings file')
|
||||
parser.add_argument('command', type=str, help="Possible options: generate or validate")
|
||||
parser.add_argument('--target-dir', type=str, help='Target directory to write the generated swift file to, defaults to Support', default='Support')
|
||||
parser.add_argument('command', type=str, help="Possible options: generate | validate")
|
||||
arguments = parser.parse_args()
|
||||
|
||||
input_file = arguments.input_file[-1]
|
||||
enum_name = "LocalString"
|
||||
target_dir = arguments.target_dir
|
||||
command = arguments.command
|
||||
if command not in ['generate', 'validate']:
|
||||
parser.print_help()
|
||||
exit()
|
||||
|
||||
input_file = "Support/en.lproj/Localizable.strings"
|
||||
enum_name = "LocalString"
|
||||
target_dir = "Support"
|
||||
template_file = "StringLocalExtension.swift_temp"
|
||||
|
||||
class Generate:
|
||||
def __init__(self, input_file_name, enum_name, target_dir):
|
||||
def __init__(self, input_file_name, template_file, enum_name, target_dir):
|
||||
self.enum_name = enum_name
|
||||
reader = Reader(input_file_name)
|
||||
vars = self.__variables(reader)
|
||||
|
||||
with open(os.path.join(target_dir, template_file)) as template_file:
|
||||
template_content = template_file.read()
|
||||
|
||||
output_path = os.path.join(target_dir, enum_name + ".swift")
|
||||
file = open(output_path, 'w')
|
||||
file.write("""//
|
||||
// !! DO NOT EDIT THIS FILE DIRECTLY !!
|
||||
// !! IT HAS BEEN AUTO-GENERATED !!
|
||||
//
|
||||
""")
|
||||
file.write(template_content)
|
||||
file.write(self.__code_for("\n\t".join(vars)))
|
||||
file.close()
|
||||
|
||||
@ -42,10 +52,7 @@ class Generate:
|
||||
return vars
|
||||
|
||||
def __code_for(self, variables):
|
||||
return """
|
||||
// Do not edit this file directly, it has been auto-generated
|
||||
|
||||
enum {} {{
|
||||
return """enum {} {{
|
||||
{}
|
||||
}}
|
||||
""".format(self.enum_name, variables)
|
||||
@ -65,7 +72,7 @@ class Reader:
|
||||
self.input_file_name = input_file_name
|
||||
|
||||
def keys(self):
|
||||
pattern = re.compile(r'"(?P<key>.+)" = "(?P<value>.+)"')
|
||||
pattern = re.compile(r'"(?P<key>.+)"\s{1,}=\s{1,}"(?P<value>.+)"')
|
||||
for line in self.input_file_name:
|
||||
match = pattern.match(line)
|
||||
if match:
|
||||
@ -80,12 +87,18 @@ class Validate:
|
||||
reader = Reader(input_file_name)
|
||||
vars = list()
|
||||
for key, _ in reader.keys():
|
||||
assert "." in key, "Invalid translation key: {}, it should contain at least one '.' (dot)".format(key)
|
||||
vars.append(key)
|
||||
|
||||
vars = sorted(vars)
|
||||
|
||||
matches = dict()
|
||||
counter = dict()
|
||||
for var in vars:
|
||||
swift_var = self.__get_var_name(var)
|
||||
counter[swift_var] = 0
|
||||
for swift_file_name in glob.iglob(os.path.join(search_directory, '**/*.swift'), recursive=True):
|
||||
if Path(swift_file_name).suffix != "{}.swift".format(enum_name):
|
||||
if Path(swift_file_name).name != "{}.swift".format(enum_name):
|
||||
with open(swift_file_name, 'r') as swift_file:
|
||||
content = swift_file.read()
|
||||
for var in vars:
|
||||
@ -93,12 +106,22 @@ class Validate:
|
||||
if var in matches:
|
||||
matches[var].append(swift_file_name)
|
||||
else:
|
||||
matches[var] = []
|
||||
assert len(matches.keys()) == 0, "localization strings are still used in: {}".format(matches)
|
||||
matches[var] = [swift_file_name]
|
||||
swift_var = self.__get_var_name(var)
|
||||
if swift_var in content:
|
||||
counter[swift_var] += 1
|
||||
|
||||
assert len(matches.keys()) == 0, "localization strings should not be used directly in swift: {}".format(matches)
|
||||
unused_swift_vars = {k: v for k, v in counter.items() if v == 0 }.keys()
|
||||
if len(unused_swift_vars) > 0:
|
||||
print("unused localizations in swift: {}".format(sorted(unused_swift_vars)))
|
||||
|
||||
def __get_var_name(self, key):
|
||||
return re.sub('[^a-z0-9]', '_', key.lower())
|
||||
|
||||
match command:
|
||||
case "generate":
|
||||
Generate(input_file, enum_name, target_dir)
|
||||
Generate(input_file, template_file, enum_name, target_dir)
|
||||
case "validate":
|
||||
Validate(input_file, enum_name)
|
||||
case _:
|
||||
|
Loading…
x
Reference in New Issue
Block a user