xcstrings-cli 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/dist/index.js +1097 -1016
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -59,6 +59,21 @@ xcs add \
|
|
|
59
59
|
--strings-format yaml \
|
|
60
60
|
--strings < translations.yaml
|
|
61
61
|
|
|
62
|
+
# Add multiple strings via heredoc
|
|
63
|
+
xcs add --strings << EOF
|
|
64
|
+
greeting:
|
|
65
|
+
translations:
|
|
66
|
+
en: Hello, World.
|
|
67
|
+
ja: こんにちは、世界。
|
|
68
|
+
zh-Hans: 你好,世界。
|
|
69
|
+
comment: A greeting message.
|
|
70
|
+
farewell:
|
|
71
|
+
en: Goodbye, World.
|
|
72
|
+
ja: さようなら、世界。
|
|
73
|
+
zh-Hans: 再见,世界。
|
|
74
|
+
comment: A farewell message.
|
|
75
|
+
EOF
|
|
76
|
+
|
|
62
77
|
# Add with only key and comment
|
|
63
78
|
xcs add --key greeting --comment "A greeting message."
|
|
64
79
|
```
|
|
@@ -222,6 +237,14 @@ These are the options for the config file:
|
|
|
222
237
|
* `skip`: Only add translations for languages included in the `xcs languages` output. (Default)
|
|
223
238
|
* `include`: Add translations even when they are not recognized by the Xcode project or xcs language list.
|
|
224
239
|
|
|
240
|
+
## Q&A
|
|
241
|
+
|
|
242
|
+
**Q: Strings are not being added for some languages. Why?**
|
|
243
|
+
|
|
244
|
+
A: By default, `xcs` only adds translations for languages that are recognized in your Xcode project (knownRegions) or the xcstrings file. You can check which languages are recognized by running `xcs languages`.
|
|
245
|
+
|
|
246
|
+
If you want to add translations for languages not included in your Xcode project, you can change the `missingLanguagePolicy` in your config file to `include`.
|
|
247
|
+
|
|
225
248
|
## LICENSE
|
|
226
249
|
|
|
227
250
|
MIT
|