Show Lumi's update notes and Play release notes in the user's language
Lumi announced each update in English whatever the language. Translations of a release now live in locales/changelog/LANGUAGE.md beside the English CHANGELOG.md; the build packs them as release-notes-LANGUAGE.json, Lumi picks the active language's notes for the same release, and update_version.sh writes each Play listing's notes. A test requires every language to translate the newest release, and the fonts cover them. Shorten the 2.1.61 notes.
This commit is contained in:
1 parent
82ed01d010
commit
28788c067a
35 files changed
+198
-13
No files matched your search
+2
-3
@@ -2,9 +2,8 @@
|
||||
|
||||
## [2.1.61] - 2026-10-29
|
||||
|
||||
- Show Chinese, Japanese and Korean text on Android 9 and older instead of question marks.
|
||||
- Show Profile accounts, device linking, nodes, Dew and friends in your language instead of English, including Chinese.
|
||||
- Translate app shortcuts, the Breathe widget and tile, and download, push and Health Connect messages.
|
||||
- Chinese, Japanese and Korean text displays correctly.
|
||||
- More of the app speaks your language, including Profile and update notes.
|
||||
|
||||
## [2.1.60] - 2026-10-29
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
- Čínský, japonský a korejský text se zobrazuje správně.
|
||||
- Víc aplikace mluví tvým jazykem, včetně profilu a poznámek k aktualizacím.
|
||||
@@ -0,0 +1,2 @@
|
||||
- Chinesischer, japanischer und koreanischer Text wird richtig angezeigt.
|
||||
- Mehr von der App spricht deine Sprache, auch das Profil und die Update-Hinweise.
|
||||
@@ -1,3 +1,2 @@
|
||||
- Show Chinese, Japanese and Korean text on Android 9 and older instead of question marks.
|
||||
- Show Profile accounts, device linking, nodes, Dew and friends in your language instead of English, including Chinese.
|
||||
- Translate app shortcuts, the Breathe widget and tile, and download, push and Health Connect messages.
|
||||
- Chinese, Japanese and Korean text displays correctly.
|
||||
- More of the app speaks your language, including Profile and update notes.
|
||||
@@ -0,0 +1,2 @@
|
||||
- El texto en chino, japonés y coreano se muestra correctamente.
|
||||
- Más partes de la app hablan tu idioma, incluidos el perfil y las notas de actualización.
|
||||
@@ -0,0 +1,2 @@
|
||||
- Le texte chinois, japonais et coréen s’affiche correctement.
|
||||
- Une plus grande partie de l’app parle votre langue, y compris le profil et les notes de mise à jour.
|
||||
@@ -0,0 +1,2 @@
|
||||
- Teks Tionghoa, Jepang, dan Korea kini tampil dengan benar.
|
||||
- Lebih banyak bagian aplikasi memakai bahasa Anda, termasuk profil dan catatan pembaruan.
|
||||
@@ -0,0 +1,2 @@
|
||||
- Il testo in cinese, giapponese e coreano si vede correttamente.
|
||||
- Più parti dell’app parlano la tua lingua, compresi il profilo e le note di aggiornamento.
|
||||
@@ -0,0 +1,2 @@
|
||||
- 中国語・日本語・韓国語の文字が正しく表示されるようになりました。
|
||||
- プロフィールや更新メモなど、より多くの画面があなたの言語で表示されます。
|
||||
@@ -0,0 +1,2 @@
|
||||
- 중국어, 일본어, 한국어 글자가 올바르게 표시됩니다.
|
||||
- 프로필과 업데이트 안내 등 더 많은 화면이 사용자의 언어로 표시됩니다.
|
||||
@@ -0,0 +1,2 @@
|
||||
- Textos em chinês, japonês e coreano aparecem corretamente.
|
||||
- Mais partes do app falam o seu idioma, incluindo o perfil e as notas de atualização.
|
||||
@@ -0,0 +1,2 @@
|
||||
- Китайский, японский и корейский текст отображается правильно.
|
||||
- Больше разделов приложения на твоём языке, включая профиль и заметки об обновлении.
|
||||
@@ -0,0 +1,2 @@
|
||||
- 中文、日文和韩文文字现在可以正常显示。
|
||||
- 更多界面使用你的语言显示,包括个人资料和更新说明。
|
||||
@@ -0,0 +1,6 @@
|
||||
# Changelog
|
||||
|
||||
## [2.1.61] - 2026-10-29
|
||||
|
||||
- Čínský, japonský a korejský text se zobrazuje správně.
|
||||
- Víc aplikace mluví tvým jazykem, včetně profilu a poznámek k aktualizacím.
|
||||
@@ -0,0 +1,6 @@
|
||||
# Changelog
|
||||
|
||||
## [2.1.61] - 2026-10-29
|
||||
|
||||
- Chinesischer, japanischer und koreanischer Text wird richtig angezeigt.
|
||||
- Mehr von der App spricht deine Sprache, auch das Profil und die Update-Hinweise.
|
||||
@@ -0,0 +1,6 @@
|
||||
# Changelog
|
||||
|
||||
## [2.1.61] - 2026-10-29
|
||||
|
||||
- El texto en chino, japonés y coreano se muestra correctamente.
|
||||
- Más partes de la app hablan tu idioma, incluidos el perfil y las notas de actualización.
|
||||
@@ -0,0 +1,6 @@
|
||||
# Changelog
|
||||
|
||||
## [2.1.61] - 2026-10-29
|
||||
|
||||
- Le texte chinois, japonais et coréen s’affiche correctement.
|
||||
- Une plus grande partie de l’app parle votre langue, y compris le profil et les notes de mise à jour.
|
||||
@@ -0,0 +1,6 @@
|
||||
# Changelog
|
||||
|
||||
## [2.1.61] - 2026-10-29
|
||||
|
||||
- Teks Tionghoa, Jepang, dan Korea kini tampil dengan benar.
|
||||
- Lebih banyak bagian aplikasi memakai bahasa Anda, termasuk profil dan catatan pembaruan.
|
||||
@@ -0,0 +1,6 @@
|
||||
# Changelog
|
||||
|
||||
## [2.1.61] - 2026-10-29
|
||||
|
||||
- Il testo in cinese, giapponese e coreano si vede correttamente.
|
||||
- Più parti dell’app parlano la tua lingua, compresi il profilo e le note di aggiornamento.
|
||||
@@ -0,0 +1,6 @@
|
||||
# Changelog
|
||||
|
||||
## [2.1.61] - 2026-10-29
|
||||
|
||||
- 中国語・日本語・韓国語の文字が正しく表示されるようになりました。
|
||||
- プロフィールや更新メモなど、より多くの画面があなたの言語で表示されます。
|
||||
@@ -0,0 +1,6 @@
|
||||
# Changelog
|
||||
|
||||
## [2.1.61] - 2026-10-29
|
||||
|
||||
- 중국어, 일본어, 한국어 글자가 올바르게 표시됩니다.
|
||||
- 프로필과 업데이트 안내 등 더 많은 화면이 사용자의 언어로 표시됩니다.
|
||||
@@ -0,0 +1,6 @@
|
||||
# Changelog
|
||||
|
||||
## [2.1.61] - 2026-10-29
|
||||
|
||||
- Textos em chinês, japonês e coreano aparecem corretamente.
|
||||
- Mais partes do app falam o seu idioma, incluindo o perfil e as notas de atualização.
|
||||
@@ -0,0 +1,6 @@
|
||||
# Changelog
|
||||
|
||||
## [2.1.61] - 2026-10-29
|
||||
|
||||
- Китайский, японский и корейский текст отображается правильно.
|
||||
- Больше разделов приложения на твоём языке, включая профиль и заметки об обновлении.
|
||||
@@ -0,0 +1,6 @@
|
||||
# Changelog
|
||||
|
||||
## [2.1.61] - 2026-10-29
|
||||
|
||||
- 中文、日文和韩文文字现在可以正常显示。
|
||||
- 更多界面使用你的语言显示,包括个人资料和更新说明。
|
||||
+1
-1
@@ -18,7 +18,7 @@ $(BUILD_DIR)/apps-ui/apps.zx: ziran.lock scripts/build-apps.py $(wildcard $(APPS
|
||||
.PHONY: apps
|
||||
apps: $(APP_BUNDLES) $(INBE_BUNDLE) $(INBE_FULL_BUNDLE)
|
||||
|
||||
$(APP_BUNDLES) $(INBE_BUNDLE) $(INBE_FULL_BUNDLE): CHANGELOG.md scripts/release_notes.py $(APPS_BUNDLE) src/apps/apps_controller.zi
|
||||
$(APP_BUNDLES) $(INBE_BUNDLE) $(INBE_FULL_BUNDLE): CHANGELOG.md $(wildcard locales/changelog/*.md) scripts/release_notes.py $(APPS_BUNDLE) src/apps/apps_controller.zi
|
||||
|
||||
$(APP_BUNDLES) $(INBE_BUNDLE) $(INBE_FULL_BUNDLE) &: $(ENTITY_SOURCES) $(APP_SOURCES) $(APP_RESOURCES) ziran.lock apps/versions.json scripts/check-package-versions.py scripts/generate-package-versions.py scripts/prepare-package-assets.py scripts/achievement_icons.py scripts/animation_inventory.py scripts/build-apps.sh src/practices/sun_salutation/sun_salutation_assets.zi src/practices/sun_salutation/sun_salutation_inventory.zi $(IMAGE_FILES) $(SOUND_FILES) $(FONT_FILES) $(STYLE_FILES) $(LOCALE_FILES) $(ZIRAN_BIN)
|
||||
sh scripts/build-apps.sh $(ZIRAN_BIN) $(BUILD_DIR)/apps $(APPS_BUNDLE)
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ READY_STAMP = ROOT / READY_OUTPUT / "stamp.json"
|
||||
SUBJECT = "Release Inner Breeze {version}"
|
||||
# What ./update_version.sh writes; only these may join the release commit.
|
||||
VERSION_FILES = ("droid/app/build.gradle", "src/core/version.h", "src/core/version.zi", "windows/inbe.rc",
|
||||
"packaging/*", "fastlane/metadata/android/en-US/changelogs/*.txt", "apps/*/CHANGELOG.md",
|
||||
"packaging/*", "fastlane/metadata/android/*/changelogs/*.txt", "apps/*/CHANGELOG.md",
|
||||
"apps/versions.json", "src/apps/versions.zi", "src/apps/host_api.zi")
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Package the latest changelog text for Lumi's offline update message."""
|
||||
"""Package the latest changelog text for Lumi's offline update message.
|
||||
|
||||
Translations of each release live in locales/changelog/LANGUAGE.md, written
|
||||
like CHANGELOG.md. They become release-notes-LANGUAGE.json beside the English
|
||||
notes, and with --play CODE the Play release notes of their listings.
|
||||
"""
|
||||
import argparse
|
||||
import json
|
||||
from pathlib import Path
|
||||
@@ -23,15 +28,52 @@ def release_notes(changelog):
|
||||
return {"version": heading[1], "notes": notes}
|
||||
|
||||
|
||||
# Play listing folder of each translated language.
|
||||
PLAY_LISTINGS = {"cs": "cs-CZ", "de": "de-DE", "es": "es-ES", "fr": "fr-FR", "id": "id",
|
||||
"it": "it-IT", "ja": "ja-JP", "ko": "ko-KR", "pt": "pt-BR", "ru": "ru-RU",
|
||||
"zh": "zh-CN"}
|
||||
|
||||
|
||||
def translations(folder, english):
|
||||
"""The notes of each language that translates the latest release."""
|
||||
result = {}
|
||||
for path in sorted(folder.glob("*.md")):
|
||||
notes = release_notes(path.read_text(encoding="utf-8"))
|
||||
if notes["version"] != english["version"]:
|
||||
continue
|
||||
if len(notes["notes"]) != len(english["notes"]):
|
||||
raise ValueError(f"{path.name} translates {len(notes['notes'])} of "
|
||||
f"{len(english['notes'])} notes for {english['version']}")
|
||||
result[path.stem] = notes
|
||||
return result
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("changelog", type=Path)
|
||||
parser.add_argument("output", type=Path)
|
||||
parser.add_argument("output", type=Path, nargs="?")
|
||||
parser.add_argument("--play", metavar="CODE", help="write Play notes for this versionCode")
|
||||
args = parser.parse_args()
|
||||
result = release_notes(args.changelog.read_text(encoding="utf-8"))
|
||||
root = args.changelog.resolve().parent
|
||||
translated = translations(root / "locales/changelog", result)
|
||||
if args.play:
|
||||
for language, notes in translated.items():
|
||||
listing = root / "fastlane/metadata/android" / PLAY_LISTINGS[language] / "changelogs"
|
||||
listing.mkdir(parents=True, exist_ok=True)
|
||||
text = "".join(f"- {note}\n" for note in notes["notes"])
|
||||
(listing / f"{args.play}.txt").write_text(text, encoding="utf-8")
|
||||
return
|
||||
if args.output is None:
|
||||
parser.error("an output file is required without --play")
|
||||
args.output.parent.mkdir(parents=True, exist_ok=True)
|
||||
args.output.write_text(json.dumps(result, ensure_ascii=False, indent=2) + "\n",
|
||||
encoding="utf-8")
|
||||
for stale in args.output.parent.glob("release-notes-*.json"):
|
||||
stale.unlink()
|
||||
for language, notes in translated.items():
|
||||
target = args.output.parent / f"release-notes-{language}.json"
|
||||
target.write_text(json.dumps(notes, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -54,6 +54,26 @@ LumiUpdateAppend :: (document: string, introduction: string) -> bool {
|
||||
return saved
|
||||
}
|
||||
|
||||
// The release notes in the given language when they describe the same
|
||||
// release; the English notes otherwise.
|
||||
LumiReleaseNotes :: (english: string, version: string, language: string) -> string {
|
||||
name := PackageText(language, ".json")
|
||||
path := PackageText("assets/app/release-notes-", name)
|
||||
defer {
|
||||
PackageFree(name)
|
||||
PackageFree(path)
|
||||
}
|
||||
resource := AssetRead(path)
|
||||
if !resource.found {
|
||||
return english
|
||||
}
|
||||
version_bytes: [32]u8
|
||||
if LumiUpdateVersion(resource.data, version_bytes[:]) != version {
|
||||
return english
|
||||
}
|
||||
return resource.data
|
||||
}
|
||||
|
||||
LumiAnnounceUpdate :: () {
|
||||
owner := AppTextFromCString(storage_user_id_buffer(), 64)
|
||||
assets := AssetGeneration()
|
||||
@@ -84,7 +104,8 @@ LumiAnnounceUpdate :: () {
|
||||
args[0].is_text = true
|
||||
introduction: [256]u8
|
||||
unused FormatTemplate(LocaleText("lumi_update_intro"), args[:], introduction[:])
|
||||
if LumiUpdateAppend(resource.data, TextUntilNul(introduction[:])) {
|
||||
notes := LumiReleaseNotes(resource.data, version, LocaleActiveCode())
|
||||
if LumiUpdateAppend(notes, TextUntilNul(introduction[:])) {
|
||||
storage_set_setting_text("lumi_release_announced", version)
|
||||
unused AppCopyText(owner, lumi_update_owner[:])
|
||||
lumi_update_assets = assets
|
||||
|
||||
@@ -64,6 +64,7 @@ if cmaps["latin"] is None:
|
||||
latin_needed = codepoints(
|
||||
root / "assets/fonts/input_common.txt", root / "locales/index.txt",
|
||||
*[root / f"locales/{name}.txt" for name in LATIN_LOCALES],
|
||||
*[root / f"locales/changelog/{name}.md" for name in LATIN_LOCALES if name != "en"],
|
||||
*[GUIDANCE / f"{name}.txt" for name in LATIN_LOCALES])
|
||||
for cp in sorted(latin_needed):
|
||||
if not is_cjk(cp) and cp not in cmaps["latin"]:
|
||||
@@ -96,7 +97,8 @@ print(f"CJK/picker: {len(cjk_needed)} required codepoints checked against "
|
||||
# A locale's selected face must cover its own text. Another bundled font
|
||||
# cannot hide a stale primary subset, especially on mobile hosts.
|
||||
for locale, face in (("ja", "jp"), ("ko", "kr"), ("zh", "sc")):
|
||||
needed = codepoints(root / f"locales/{locale}.txt", GUIDANCE / f"{locale}.txt")
|
||||
needed = codepoints(root / f"locales/{locale}.txt", root / f"locales/changelog/{locale}.md",
|
||||
GUIDANCE / f"{locale}.txt")
|
||||
cmap = cmaps[face] or {}
|
||||
before = failures
|
||||
for cp in sorted(needed):
|
||||
|
||||
@@ -17,10 +17,15 @@
|
||||
|
||||
update_document: string = "{\"version\":\"2.1.36\",\"notes\":[\"Lumi’s update message.\",\"Visible paragraphs.\"]}";
|
||||
|
||||
translated_document: string = "{\"version\":\"2.1.36\",\"notes\":[\"Lumi 的更新消息。\",\"可见的段落。\"]}";
|
||||
|
||||
UpdateAsset :: (path: string) -> AssetView {
|
||||
if path == "assets/app/release-notes.json" {
|
||||
return AssetView.{.found = true, .data = update_document}
|
||||
}
|
||||
if path == "assets/app/release-notes-zh.json" {
|
||||
return AssetView.{.found = true, .data = translated_document}
|
||||
}
|
||||
return AssetView.{}
|
||||
}
|
||||
|
||||
@@ -35,6 +40,12 @@ Check :: () -> s32 {
|
||||
root := data_root()
|
||||
check_true("fixture storage initialized", storage_init(root) != 0)
|
||||
AssetBindProvider(UpdateAsset)
|
||||
check_true("notes follow the active language",
|
||||
LumiReleaseNotes(update_document, "2.1.36", "zh") == translated_document)
|
||||
check_true("a language without notes keeps English",
|
||||
LumiReleaseNotes(update_document, "2.1.36", "fr") == update_document)
|
||||
check_true("notes of an older release are not shown for a new one",
|
||||
LumiReleaseNotes(update_document, "2.1.37", "zh") == update_document)
|
||||
LumiStoreAppend("Existing conversation", true)
|
||||
LumiAnnounceUpdate()
|
||||
check_int("one release message preserves existing chat", LumiStoreCount(), 2)
|
||||
|
||||
@@ -5,7 +5,9 @@ import unittest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
sys.path.insert(0, str(ROOT / "scripts"))
|
||||
from release_notes import release_notes
|
||||
import tempfile
|
||||
|
||||
from release_notes import release_notes, translations
|
||||
|
||||
|
||||
class ReleaseNotesTest(unittest.TestCase):
|
||||
@@ -30,6 +32,24 @@ class ReleaseNotesTest(unittest.TestCase):
|
||||
with self.subTest(document=document), self.assertRaises(ValueError):
|
||||
release_notes(document)
|
||||
|
||||
def test_translations_follow_the_latest_release(self):
|
||||
english = {"version": "2.1.36", "notes": ["One.", "Two."]}
|
||||
with tempfile.TemporaryDirectory() as folder:
|
||||
Path(folder, "de.md").write_text("## [2.1.36] - 2026-10-18\n- Eins.\n- Zwei.\n")
|
||||
Path(folder, "fr.md").write_text("## [2.1.35] - 2026-10-17\n- Ancien.\n")
|
||||
self.assertEqual(translations(Path(folder), english),
|
||||
{"de": {"version": "2.1.36", "notes": ["Eins.", "Zwei."]}})
|
||||
Path(folder, "it.md").write_text("## [2.1.36] - 2026-10-18\n- Uno.\n")
|
||||
with self.assertRaises(ValueError):
|
||||
translations(Path(folder), english)
|
||||
|
||||
def test_every_language_translates_the_latest_release(self):
|
||||
english = release_notes((ROOT / "CHANGELOG.md").read_text())
|
||||
languages = [line.split("|")[0] for line in
|
||||
(ROOT / "locales/index.txt").read_text().splitlines() if line.strip()]
|
||||
self.assertEqual(sorted(translations(ROOT / "locales/changelog", english)),
|
||||
sorted(language for language in languages if language != "en"))
|
||||
|
||||
def test_real_changelog_matches_the_application_version(self):
|
||||
notes = release_notes((ROOT / "CHANGELOG.md").read_text())
|
||||
self.assertIn('VersionString :: "' + notes["version"] + '"',
|
||||
|
||||
@@ -200,6 +200,9 @@ CHANGELOG_CONTENT=$(awk -v ver="$LATEST_VERSION" '
|
||||
|
||||
echo "$CHANGELOG_CONTENT" > "$OUTPUT_FILE"
|
||||
echo "✓ Updated $OUTPUT_FILE"
|
||||
# Each listing that has a translation of this release shows it in Play.
|
||||
python3 scripts/release_notes.py --play "$VERSION_CODE" "$CHANGELOG_FILE"
|
||||
echo "✓ Updated translated Play release notes"
|
||||
|
||||
python3 scripts/check-version.py
|
||||
|
||||
|
||||
Reference in new issue
Block a user