Skip to content

Commit 6b92ee4

Browse files
committed
Update README for 0.4.0 release and plural support
Bump version references from 0.3.1/0.2.0 to 0.4.0. Update documentation to clarify full plural support for Android and .xcstrings, and add notes on plural handling in the CLI. Minor improvements to usage instructions and feature tables.
1 parent 9b37531 commit 6b92ee4

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
## Status
1010

11-
This is a `0.3.1` release available on [crates.io](https://crates.io/crates/langcodec). As a 0.x version, the API may evolve as development continues. The library is functional and well-tested, but breaking changes may occur in future releases. Contributions and feedback are very welcome to help shape the future of this project!
11+
This is a `0.4.0` release available on [crates.io](https://crates.io/crates/langcodec). As a 0.x version, the API may evolve as development continues. The library is functional and well-tested, but breaking changes may occur in future releases. Contributions and feedback are very welcome to help shape the future of this project!
1212

1313
---
1414

@@ -28,7 +28,7 @@ Add to your `Cargo.toml`:
2828

2929
```toml
3030
[dependencies]
31-
langcodec = "0.3.1"
31+
langcodec = "0.4.0"
3232
```
3333

3434
---
@@ -52,12 +52,11 @@ langcodec = "0.3.1"
5252
|-----------------------|:-----:|:-----:|:-------:|:-----:|:----------------:|----------|
5353
| Apple `.strings` | ✔️ | ✔️ | ✔️ | ✔️ | No | ✔️ |
5454
| Apple `.xcstrings` | ✔️ | ✔️ | ✔️ | ✔️ | Yes<sup>*</sup>| ✔️ |
55-
| Android `strings.xml` | ✔️ | ✔️ | ✔️ | ✔️ | No<sup>*</sup> | ✔️ |
55+
| Android `strings.xml` | ✔️ | ✔️ | ✔️ | ✔️ | Yes | ✔️ |
5656
| CSV | ✔️ | ✔️ | ✔️ | ✔️ | No ||
5757
| TSV | ✔️ | ✔️ | ✔️ | ✔️ | No ||
5858

59-
<sup>* Plural support for `.xcstrings` is not under beta testing, and may not be fully implemented yet.</sup>
60-
<sup>* Plural support for Android may be added in the future.</sup>
59+
<sup>* `.xcstrings` plural support is implemented via CLDR categories.</sup>
6160

6261
<!-- markdownlint-enable no-inline-html no-space-in-emphasis -->
6362

@@ -71,7 +70,7 @@ Add to your `Cargo.toml`:
7170

7271
```toml
7372
[dependencies]
74-
langcodec = "0.2.0"
73+
langcodec = "0.4.0"
7574
```
7675

7776
#### Example: Read, Manipulate, and Write
@@ -158,17 +157,24 @@ cargo install --path langcodec-cli
158157
```sh
159158
langcodec view -i input.strings --lang en
160159
langcodec view -i input.tsv --lang en
160+
langcodec view -i strings.xml --full # Displays "Type: Plural" for Android plurals
161161
```
162162

163163
#### Notes
164164

165-
- For CSV files, the language code (`--lang`) is required for most operations.
165+
- For CSV/TSV single-language files, the language code (`--lang`) may be required.
166166
- All commands support Apple `.strings`, `.xcstrings`, Android `strings.xml`, and CSV.
167167
- The convert command also supports JSON files with key-value pairs.
168168
- The CLI will error if you try to merge files of different formats.
169169
- Android path inference: `values/strings.xml` (no qualifier) defaults to English (`en`).
170170
- When converting to `.xcstrings`, if `source_language` or `version` metadata is missing, the CLI defaults them to `en` and `1.0` respectively (overridable via flags).
171171

172+
#### Plurals
173+
174+
- Android `<plurals>` are fully supported. They convert to the internal `Translation::Plural` representation and back to `<plurals>` with quantities `zero/one/two/few/many/other`.
175+
- `.xcstrings` plural variations convert to Android `<plurals>` when targeting Android output.
176+
- The `view` command prints plural entries with a "Type: Plural" header and each category/value.
177+
172178
#### Custom Formats
173179

174180
The CLI supports additional custom formats for specialized use cases:

0 commit comments

Comments
 (0)