Repository navigation
Add Russian localization (string resources + values-ru) - #143
g4st3r-d3v wants to merge 2 commits into
Conversation
Move user-visible strings out of Kotlin literals into string resources and add a Russian translation (values-ru). English output is unchanged. - Composables use stringResource / pluralStringResource. - Code without a Context (view-model state builders, threshold engine, formatters, notifications) goes through util/L10n. In JVM unit tests it reads the default values/strings.xml, so existing English assertions pass without modification. - util/LocaleFormats picks locale-aware date/time patterns (24h clock and day-month order where the locale uses them; en-US output is unchanged). - coach/context/CoachLanguage appends an output-language directive to the chat, summary, check-in and meal-estimate system prompts for non-English locales. Prompts, tool schemas and parsers stay English; for an English locale the directive is empty and prompts are byte-for-byte unchanged. - res/xml/locales_config.xml enables the Android 13+ per-app language picker. - README.ru.md. Left in English on purpose: the Debug console, local-LLM probe notes, model names/blurbs, and diagnostics exports.
The tiles had a fixed 118dp height, which clipped the subtitle whenever a title wrapped to two lines (common in Russian). Rows now size to the taller tile; shorter Russian labels also keep most tiles on one line.
|
Hey @g4st3r-d3v, thanks a ton for this! 🙌 Getting ~1,100 strings out of Kotlin and into resources is a big, boring job, and you did all of it. The English and Russian files line up really nicely: placeholders match, every I went through it carefully and found a few things that only show up at runtime, so neither the build nor the tests catch them. None of them are big, just a handful of edge cases: Worth fixing before we merge
Spots that are still half-English
Small stuff, not blocking
Process stuff
No rush at all. Happy to help with any of it, and thanks again for doing this! 🇷🇺 |
Hi! I made a Russian translation of PulseLoop Android for myself, with Claude (Claude Code) doing most of the work. It came out clean enough that I wanted to offer it upstream. If it's useful, feel free to merge it or suggest changes. If it isn't a direction you want for the project, no problem at all: I'll keep it in my fork.
What it does
strings.xmland adds a Russian translation invalues-ru(about 1,100 strings, with proper plurals).stringResource/pluralStringResource. Code without aContext(view-model state builders,VitalsThresholdEngine, formatters, notifications) goes through a smallutil/L10nhelper. In JVM unit tests there is no Context, soL10nreads the defaultvalues/strings.xmldirectly, and tests asserting English text keep working.util/LocaleFormatspicks locale-aware date/time patterns via Android's best-pattern skeletons (24h clock and day-month order where the locale uses them). en-US output looks the same as before.coach/context/CoachLanguageappends one sentence to the chat, summary, check-in and meal-estimate system prompts, asking the model to answer in the app's language. For English the directive is empty, so prompts are byte-for-byte what they were.res/xml/locales_config.xmlenables the Android 13+ per-app language picker.README.ru.mdplus a one-line link fromREADME.md.Left in English on purpose: the Debug console, local-LLM probe notes, model names/blurbs, and diagnostics exports, since those are meant for bug reports.
Adding another language now only takes a
values-xx/strings.xmland one line inlocales_config.xml.Scope / caveats
ring/are limited to error-message strings.testDebugUnitTestandassembleDebugpass; I checked the Russian build on my phone.🤖 Generated with Claude Code