Move store descriptions into strings files

This makes translation easier as there's a single file to edit at.
Existing short and full descriptions are conserved.

sync_translations.py takes care of updating the metadata files.

The metadata directories are renamed to match the language codes used in `res/`.

Contributing guidelines are updated accordingly.
This commit is contained in:
Jules Aguillon 2024-02-05 17:36:43 +01:00
parent 82a9774f5a
commit 5ce89d1b4b
100 changed files with 197 additions and 15 deletions

View File

@ -174,15 +174,13 @@ default translation in `res/values/strings.xml`, which contain the structure of
the file and the English strings.
To check that `strings.xml` is formatted correctly, run
`./gradlew syncTranslations`. This will modify your files.
`python sync_translations.py`. This will modify your files.
The store description is found in `metadata/android/<locale>/`,
`short_description.txt` and `full_description.txt`.
The short description must not exceed 80 characters.
Store descriptions in `metedata/` are updated automatically.
Translating changelogs is not useful.
The app name might be partially translated, the "Unexpected" word should remain
untranslated.
untranslated if possible.
As translations need to be updated regularly, you can subscribe to this issue
to receive a notification when an update is needed:

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View File

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -0,0 +1 @@
صفحه کلید غیرمنتظره

View File

@ -0,0 +1 @@
Unexpected Keyboard

View File

@ -0,0 +1 @@
Unexpected Keyboard

View File

@ -0,0 +1 @@
Unexpected Keyboard

View File

@ -0,0 +1 @@
Unexpected Keyboard

View File

@ -0,0 +1 @@
Unexpected Keyboard

View File

@ -0,0 +1 @@
Unexpected Keyboard

View File

@ -2,6 +2,25 @@
<resources>
<string name="app_name_release">Klávesnice Unexpected</string>
<string name="app_name_debug">Klávesnice Unexpected (pro ladění)</string>
<string name="short_description">Nenáročná virtuální klávesnice pro vývojáře.</string>
<string name="store_description">"Tato aplikace je virtuální klávesnící pro Android. Umožňuje rychlejší a plynulejší psaní písmen i symbolů (vč. diakritiky), a to ve vícero jazycích a vlastních rozloženích. To vše zdarma, bez reklam a bez plýtvání vašeho uložiště. Můžete psát libovolné znaky pomocí gest (ASCII i Unicode), používat mrtvé (univerzální) klávesy pro diakritická znaménka a mnohem více.
Klávesnice zobrazuje až 4 další znaky v rozích každé klávesy. Tyto znaky jsou vyvolány přejetím prstu do vybraného rohu.
No zkrátka...:
- Obsahuje každý znak a speciální klávesu, která je běžnou součástí počítačové klávesnice. To přijde vhod obzvláště při používání aplikací jako např. Termux
- Můžete používat modifikační klávesy, obohaceny o speciální klávesy (např. Tab, Esc, šipky, F klávesy, ale také Ctrl nebo Alt !)
- Můžete psát vícero jazyky rychleji a bez chyb. Diakritická znaménka mohou být vyvolána i za pomocí mrtvých kláves. Nejdříve zvolte diakritické znaménko a pak znak, který chcete obohatit o toto znaménko.
- Je vysoce nenáročná a rychlá. Zabere 500x méně místa než klávesnice od Googlu (Gboard) a 15x méně než výchozí klávesnice systému. Bez reklam, bez sledování.
- Má vícero rozložení: QWERTY, QWERTZ, AZERTY. Motivy: Bílá, Tmavá, OLED Černá. A mnoho dalších které si s drobnou znalostí programování můžete upravovat dle libosti.
Nezapomeňte... Jako každá virtuální klávesnice, i tato musí být aktivována v nastavení systému (zařízení). Otevřte (Systémové) Nastavení a přejděte na:
(Další nastavení NEBO Nastavení systému) &gt; Jazyk &amp; způsob zadávání &gt; Spravovat klávesnice."</string>
<string name="settings_activity_label">Nastavení Klávesnice Unexpected</string>
<string name="pref_portrait">V režimu na výšku</string>
<string name="pref_landscape">V režimu na šířku</string>

View File

@ -2,6 +2,13 @@
<resources>
<string name="app_name_release">Unexpected Keyboard</string>
<string name="app_name_debug">Unexpected Keyboard (Debug)</string>
<string name="short_description">Eine schlanke, datenschutzfreundliche Bildschirmtastatur für Android.</string>
<string name="store_description">"Diese Tastatur zeichnet sich dadurch aus, dass man zusätzliche Zeichen durch Wischgesten in Richtung der Tastenecken eingeben kann.
Die Anwendung wurde ursprünglich für das Programmieren in Termux entwickelt.
Mittlerweile ist sie auch für den täglichen Gebrauch perfekt geeignet.
Diese App enthält keine Werbung, benötigt keinen Netzwerkzugriff und ist quelloffen."</string>
<string name="settings_activity_label">Unexpected Keyboard - Einstellungen</string>
<string name="pref_portrait">Im Hochformatmodus</string>
<string name="pref_landscape">Im Querformatmodus</string>

View File

@ -2,6 +2,13 @@
<resources>
<string name="app_name_release">Unexpected Keyboard</string>
<string name="app_name_debug">Unexpected Keyboard (debug)</string>
<string name="short_description">Un teclado virtual ligero para Android consciente de su privacidad.</string>
<string name="store_description">"La característica principal es que hay acceso a más caractéres deslizando hacia las esquinas de las teclas.
Esta aplicación fue originalmente diseñada para programadores que usaran Termux.
Ahora es perfecta para uso cotidiano.
La misma no contiene ningún anuncio/publicidad, no realiza peticiones de red y es de Fuente Abierta."</string>
<string name="settings_activity_label">Ajustes de Unexpected Keyboard</string>
<string name="pref_portrait">En modo vertical</string>
<string name="pref_landscape">En modo horizontal</string>

View File

@ -2,6 +2,13 @@
<resources>
<string name="app_name_release">صفحه کلید غیرمنتظره</string>
<string name="app_name_debug">صفحه کلید غیرمنتظره</string>
<!-- <string name="short_description">Lightweight and privacy-conscious virtual keyboard for Android.</string> -->
<!-- <string name="store_description">"The main feature is that you can type more characters by swiping the keys towards the corners.
This application was originally designed for programmers using Termux.
Now perfect for everyday use.
This application contains no ads, doesn't make any network requests and is Open Source."</string> -->
<string name="settings_activity_label">تنظیمات صفحه کلید غیرمنتظره</string>
<string name="pref_portrait">در حالت عمودی</string>
<string name="pref_landscape">در حالت افقی</string>

View File

@ -2,6 +2,13 @@
<resources>
<string name="app_name_release">Unexpected Keyboard</string>
<string name="app_name_debug">Unexpected Keyboard (debug)</string>
<string name="short_description">Clavier virtuel léger et respectueux de la vie privée pour Android.</string>
<string name="store_description">"La fonctionnalité principale est l'accès rapide à plus de caractères en balayant les touches vers les coins.
Cette application a été conçue à l'origine pour les programmeurs utilisant Termux.
Elle est maintenant parfaite pour une utilisation quotidienne.
Cette application ne contient pas de publicité, n'accède pas au réseau et est Open Source."</string>
<string name="settings_activity_label">Unexpected Keyboard Paramètres</string>
<string name="pref_portrait">En mode portrait</string>
<string name="pref_landscape">En mode landscape</string>

View File

@ -2,6 +2,13 @@
<resources>
<string name="app_name_release">Unexpected Keyboard</string>
<string name="app_name_debug">Unexpected Keyboard (debug)</string>
<string name="short_description">Una Tastiera Virtuale Leggera Per La Programmazione</string>
<!-- <string name="store_description">"The main feature is that you can type more characters by swiping the keys towards the corners.
This application was originally designed for programmers using Termux.
Now perfect for everyday use.
This application contains no ads, doesn't make any network requests and is Open Source."</string> -->
<string name="settings_activity_label">Impostazioni di Unexpected Keyboard</string>
<!-- <string name="pref_portrait">In portrait mode</string> -->
<!-- <string name="pref_landscape">In landscape mode</string> -->

View File

@ -1,7 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- <string name="app_name_release">Unexpected Keyboard</string> -->
<string name="app_name_release">Unexpected Keyboard</string>
<!-- <string name="app_name_debug">Unexpected Keyboard (Debug)</string> -->
<string name="short_description">개발자들을 위한 가벼운 가상 키보드.</string>
<string name="store_description">"이 앱은 안드로이드용 가상 키보드입니다. 주요 기능은 스와이프 제스처를 사용하여 모든 ASCII 문자를 쉽게 입력할 수 있다는 점과 악센트 및 수정자 키를 위한 데드 키와 특수 키(tab, esc, 방향키 등)이 있다는 것입니다.
키보드는 각 키의 모서리에 최대 4개의 추가 문자를 표시합니다. 이러한 추가 문자는 키에서 손가락을 스와이프하여 적중됩니다.
일부 하이라이트 기능:
- PC 키보드에서 사용할 수 있는 모든 문자 및 특수 키를 사요 가능합니다. 이것은 Termux와 같은 앱을 사용하는 데 효과적입니다.
- 여기에는 Tab, Esc, 방향키 및 function 키뿐만이 아닌 Ctrl 및 Alt 키도 포함되어 있습니다 !
- 악센트 키는 데드 키를 사용하여 액세스할 수 있습니다. 먼저 악센트 키를 활성화한 다음 악센트 문자를 입력합니다.
- 매우 가볍고 빠릅니다. Google 키보드보다 500배, 기본 키보드보다 15배 적은 공간을 사용합니다. 광고와 사용 기록 추적 없음.
- 다중 레이아웃: QWERTY, QWERTZ, AZERTY. 다양한 테마: White, Dark, OLED Black. 또한 다른 많은 옵션들.
다른 가상 키보드와 마찬가지로 시스템 설정에서 활성화해야 합니다. 시스템 설정을 열고 다음으로 이동합니다.
시스템 &gt; 언어 및 입력 &gt; 키보드 &gt; 키보드 관리."</string>
<string name="settings_activity_label">Unexpected Keyboard 설정</string>
<!-- <string name="pref_portrait">In portrait mode</string> -->
<!-- <string name="pref_landscape">In landscape mode</string> -->

View File

@ -2,6 +2,13 @@
<resources>
<string name="app_name_release">Unexpected Keyboard</string>
<string name="app_name_debug">Unexpected Keyboard (atkļūdošana)</string>
<string name="short_description">Mazizmēra un privātumu ievērojoša virtuālā Android tastatūra.</string>
<string name="store_description">"Galvenā iezīme ir iespēja ievadīt vairāk rakstzīmju ar pavilkšanu uz taustiņu stūriem.
Šī lietotne sākotnēji tika izstrādāta programmētājiem, kas izmanto Termux.
Tagad lieliski piemērota izmantošanai ikdienā.
Šī lietotne nesatur reklāmas, neveic nekādus tīkla pieprasījumus, un tās pirmkods ir pieejams visiem."</string>
<string name="settings_activity_label">Unexpected Keyboard iestatījumi</string>
<string name="pref_portrait">Stateniski</string>
<string name="pref_landscape">Guleniski</string>

View File

@ -2,6 +2,13 @@
<resources>
<string name="app_name_release">Unexpected Keyboard</string>
<string name="app_name_debug">Unexpected Keyboard (debug)</string>
<string name="short_description">Lekka i dbająca o prywatność klawiatura wirtualna dla Androida.</string>
<string name="store_description">"Główną cechą tej klawiatury jest możliwość wprowadzania więcej znaków poprzez przesuwanie po klawiszach do ich rogów.
Ta aplikacja została pierwotnie zaprojektowana z myślą o programistach używających Termuxa.
Obecnie nadaje się doskonale do codziennego użytku.
Aplikacja nie zawiera reklam, nie żąda dostępu do internetu, a jej kod źródłowy jest dostępny publicznie."</string>
<string name="settings_activity_label">Ustawienia Unexpected Keyboard</string>
<string name="pref_portrait">W widoku pionowym</string>
<string name="pref_landscape">W widoku poziomym</string>

View File

@ -2,6 +2,25 @@
<resources>
<string name="app_name_release">Teclado Unexpected</string>
<string name="app_name_debug">Teclado Unexpected</string>
<string name="short_description">Um teclado virtual leve para desenvolvedores.</string>
<string name="store_description">"Um teclado virtual para aparelhos Android. Os recursos principais são facilidade de digitar todos os caracteres ASCII deslizando o dedo, teclas "mortas" para acentos e teclas modificadoras e a presença de teclas especiais (tab, esc, setas, etc..).
O teclado mostra até 4 caracteres extras nos cantos de cada tecla. Esses caracteres são digitáveis com o deslizar do dedo na tecla.
Alguns dos recursos interessantes:
- Todos caracteres e teclas especiais que também estão disponíveis num teclado de PC. Perfeito para usar com aplicativos como Termux.
- Incluindo Tab, Esc, as setas e teclas de função, e também Ctrl e Alt!
- Caracteres acentuados são digitáveis usando teclas "mortas". Primeiro ative o acento e depois digite a letra.
- Muito leve e rápido. Ocupa 500x menos espaço que o teclado da Google e 15x menos espaço que o teclado padrão. Sem propaganda, sem rastreio.
- Vários layouts: QWERTY, QWERTZ, AZERTY. Temas: Branco, Escuro, Preto OLED. E muitas outras opções.
Como qualquer outro teclado virtual, tem de ser ativado nas configurações de sistema. Abra as configurações e vá para:
Sistema &gt; Idioma e entrada &gt; Teclado virtual &gt; Gerenciar teclados virtuais."</string>
<string name="settings_activity_label">Configurações</string>
<string name="pref_portrait">No modo retrato</string>
<string name="pref_landscape">No modo paisagem</string>

View File

@ -1,7 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name_release">Tastatură Unexpected</string>
<string name="app_name_release">Unexpected Keyboard</string>
<string name="app_name_debug">Tastatură Unexpected (depanare)</string>
<string name="short_description">Tastatură virtuală pentru Android, ușoară și respectuoasă cu viața privată.</string>
<string name="store_description">"Funcționalitatea principală este accesul rapid la o mulțime de caractere ASCII prin glisarea către colțurile tastelor.
Această aplicație a fost concepută inițial pentru programatori care folosec Termux.
Este perfectă pentru uzul cotidian.
Această aplicație nu conține publicitate, nu folosește rețeaua deloc și e Open Source."</string>
<string name="settings_activity_label">Setări Tastatură Unexpected</string>
<string name="pref_portrait">În mod portret</string>
<string name="pref_landscape">În mod panoramă</string>

View File

@ -2,6 +2,13 @@
<resources>
<string name="app_name_release">Unexpected Keyboard</string>
<string name="app_name_debug">Unexpected Keyboard (отладка)</string>
<string name="short_description">Легкая клавиатура для пользователей, заботящихся о конфиденциальности.</string>
<string name="store_description">"Главная особенность клавиатуры - это возможность легко напечатать любой ASCII символ за счет свайпов в углы клавиш.
Приложение изначально было разработано для использования Termux.
На данный момент, оно также удобно в повседневном использовании.
Приложение не содержит рекламы, не осуществляет никаких запросов в сеть и имеет открытый исходный код."</string>
<string name="settings_activity_label">Unexpected Keyboard Настройки</string>
<string name="pref_portrait">В портретном режиме</string>
<string name="pref_landscape">В ландшафтном режиме</string>

View File

@ -2,6 +2,13 @@
<resources>
<string name="app_name_release">Unexpected Keyboard</string>
<string name="app_name_debug">Unexpected Keyboard (debug)</string>
<string name="short_description">Android için hafif ve güvenlik odaklı bir sanal klavye uygulaması.</string>
<string name="store_description">"Bu uygulama özünde tuşların kenarlarından kaydırarak daha fazla karakter yazabilmek amacıyla geliştirildi.
Bu uygulama aslında Termux kullanıcıları için geliştirildi.
Artık gündelik kullanım için de uygun.
Bu uygulama açık kaynaklıdır. Reklam içermez ve internete bağlanmaz."</string>
<string name="settings_activity_label">Unexpected Keyboard Ayarları</string>
<string name="pref_portrait">Portre modunda</string>
<string name="pref_landscape">Manzara modunda</string>

View File

@ -2,6 +2,13 @@
<resources>
<string name="app_name_release">Unexpected Keyboard</string>
<string name="app_name_debug">Unexpected Keyboard (Налагодження)</string>
<!-- <string name="short_description">Lightweight and privacy-conscious virtual keyboard for Android.</string> -->
<!-- <string name="store_description">"The main feature is that you can type more characters by swiping the keys towards the corners.
This application was originally designed for programmers using Termux.
Now perfect for everyday use.
This application contains no ads, doesn't make any network requests and is Open Source."</string> -->
<string name="settings_activity_label">Unexpected Keyboard Налаштування</string>
<string name="pref_portrait">У портретному режимі</string>
<string name="pref_landscape">У альбомному режимі</string>

View File

@ -2,6 +2,13 @@
<resources>
<string name="app_name_release">Unexpected Keyboard</string>
<string name="app_name_debug">Unexpected Keyboard (gỡ lỗi)</string>
<string name="short_description">Bàn phím ảo gọn nhẹ và tôn trọng quyền riêng tư cho Android.</string>
<string name="store_description">"Chức năng chính là dễ dàng gõ nhiều ký tự bằng cách kéo phím về góc của nó.
Ứng dụng này ban đầu được thiết kế cho các lập trình viên dùng Termux.
Bây giờ đã hoàn hảo cho việc sử dụng hàng ngày.
Ứng dụng này không chứa quảng cáo, không cần đến mạng, và có mã nguồn mở."</string>
<string name="settings_activity_label">Cài đặt Unexpected Keyboard</string>
<string name="pref_portrait">Trong chế độ chân dung</string>
<string name="pref_landscape">Trong chế độ phong cảnh</string>

View File

@ -2,6 +2,13 @@
<resources>
<string name="app_name_release">Unexpected Keyboard</string>
<string name="app_name_debug">Unexpected Keyboard (debug)</string>
<!-- <string name="short_description">Lightweight and privacy-conscious virtual keyboard for Android.</string> -->
<!-- <string name="store_description">"The main feature is that you can type more characters by swiping the keys towards the corners.
This application was originally designed for programmers using Termux.
Now perfect for everyday use.
This application contains no ads, doesn't make any network requests and is Open Source."</string> -->
<string name="settings_activity_label">Unexpected Keyboard 设置</string>
<string name="pref_portrait">在竖屏模式下</string>
<string name="pref_landscape">在横屏模式下</string>

View File

@ -2,6 +2,13 @@
<resources>
<string name="app_name_release">Unexpected Keyboard</string>
<string name="app_name_debug">Unexpected Keyboard (Debug)</string>
<string name="short_description">Lightweight and privacy-conscious virtual keyboard for Android.</string>
<string name="store_description">"The main feature is that you can type more characters by swiping the keys towards the corners.
This application was originally designed for programmers using Termux.
Now perfect for everyday use.
This application contains no ads, doesn't make any network requests and is Open Source."</string>
<string name="settings_activity_label">Unexpected Keyboard Settings</string>
<string name="pref_portrait">In portrait mode</string>
<string name="pref_landscape">In landscape mode</string>

View File

@ -1,5 +1,5 @@
import xml.etree.ElementTree as ET
import glob
import glob, os
# Edit every strings.xml files:
# - Add missing translation as comments
@ -38,10 +38,32 @@ def sync(baseline, strings):
(key, base_string, True)
for key, base_string in baseline.items() ]
def sync_metadata(locale, strings):
meta_dir = "metadata/android/" + locale
def sync_meta_file(fname, string_name):
if string_name in strings:
string = strings[string_name]
if not os.path.isdir(meta_dir):
os.makedirs(meta_dir)
txt_file = os.path.join(meta_dir, fname)
with open(txt_file, "w", encoding="utf-8") as out:
out.write(string.text.removeprefix('"').removesuffix('"'))
out.write("\n")
sync_meta_file("title.txt", ("app_name_release", None))
sync_meta_file("short_description.txt", ("short_description", None))
sync_meta_file("full_description.txt", ("store_description", None))
baseline = parse_strings_file("res/values/strings.xml")
for strings_file in glob.glob("res/values-*/strings.xml"):
strings = sync(baseline, dict(parse_strings_file(strings_file)))
for value_dir in glob.glob("res/values-*"):
strings_file = os.path.join(value_dir, "strings.xml")
if os.path.isfile(strings_file):
local_strings = dict(parse_strings_file(strings_file))
synced_strings = sync(baseline, local_strings)
with open(strings_file, "w", encoding="utf-8") as out:
write_updated_strings(out, strings)
print_status(strings_file, strings)
write_updated_strings(out, synced_strings)
locale = os.path.basename(value_dir).removeprefix("values-")
sync_metadata(locale, local_strings)
print_status(strings_file, synced_strings)
sync_metadata("en", baseline)