Skip to content

Commit a241b9f

Browse files
authored
Merge pull request #13 from ahavili/feat/annotate-strings-android
Extend annotate support to Apple strings and Android XML
2 parents 0cf6fe5 + f6ff304 commit a241b9f

7 files changed

Lines changed: 709 additions & 62 deletions

File tree

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,29 @@ langcodec translate \
8787
--provider openai \
8888
--model gpt-5.4
8989

90+
# Draft translations between single-language files too
91+
langcodec translate \
92+
--source en.lproj/Localizable.strings \
93+
--target values-fr/strings.xml \
94+
--source-lang en \
95+
--target-lang fr \
96+
--provider openai \
97+
--model gpt-5.4
98+
9099
# Generate translator-facing comments from source usage
91100
langcodec annotate \
92101
--input Localizable.xcstrings \
93102
--source-root Sources \
94103
--source-root Modules \
95104
--provider openai \
96105
--model gpt-5.4
106+
107+
# Annotate Apple .strings or Android XML inline
108+
langcodec annotate \
109+
--input en.lproj/Localizable.strings \
110+
--source-root Sources \
111+
--provider openai \
112+
--model gpt-5.4
97113
```
98114

99115
## Packages
@@ -115,7 +131,7 @@ langcodec annotate \
115131

116132
## AI Workflows
117133

118-
`langcodec` is built for app localization workflows, not just isolated text snippets. `translate` and `annotate` can be driven from a shared `langcodec.toml`, use supported providers such as OpenAI, Anthropic, and Gemini, and scale from a single catalog to config-driven runs across larger repos.
134+
`langcodec` is built for app localization workflows, not just isolated text snippets. `translate` and `annotate` can be driven from a shared `langcodec.toml`, use supported providers such as OpenAI, Anthropic, and Gemini, and scale from single-language files or `.xcstrings` catalogs to config-driven runs across larger repos.
119135

120136
```toml
121137
[openai]

langcodec-cli/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ langcodec translate \
3939
`translate` is built for app catalogs, not just raw text:
4040

4141
- updates multi-language files like `.xcstrings` in place
42+
- supports single-language Apple `.strings` and Android `strings.xml` files too
4243
- supports multiple target languages in one run
4344
- can prefill from Tolgee before using AI fallback
4445
- shows live progress with `--ui auto|plain|tui`
@@ -56,7 +57,15 @@ langcodec annotate \
5657
--model gpt-5.4
5758
```
5859

59-
`annotate` looks through your codebase and writes better `.xcstrings` comments for translators while preserving manual comments.
60+
`annotate` looks through your codebase and writes better translator comments for `.xcstrings`, Apple `.strings`, and Android `strings.xml` files while preserving manual comments.
61+
62+
```sh
63+
langcodec annotate \
64+
--input en.lproj/Localizable.strings \
65+
--source-root Sources \
66+
--provider openai \
67+
--model gpt-5.4
68+
```
6069

6170
### Tolgee sync without a pile of project scripts
6271

0 commit comments

Comments
 (0)