@drone1/alt 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/README.md +12 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -100,7 +100,7 @@ Sample output:
100
100
  Note that output files can be lower-cased if you pass the ``--normalize-output-filenames`` option, so `fr-FR` translations would write to `fr-fr.json`
101
101
 
102
102
  ## Config file
103
- [_optional_] You can create a config file. By default, `ALT` will search the output directory for `config.json`, but you can specify a path directly using
103
+ [_optional_] You can create a config file. By default, ALT will search the output directory for `config.json`, but you can specify a path directly using
104
104
  `--config-file`.
105
105
  Example
106
106
  config:
@@ -281,20 +281,27 @@ Internally, there is currently nothing in the prompt about this. I've tested wit
281
281
  Please submit an issue if it causes you any trouble.
282
282
 
283
283
  ## Translation rules
284
- When does ALT translate a given source string? Translation will occur for a given target language & reference key/value if any of the following are true:
284
+ Under what conditions will ALT translate a given source string?
285
+
286
+ Translation will occur for a given target language & reference key/value if any of the following are true:
287
+
285
288
  * The output file does not exist
289
+ * Example: You're translating to target language _zh-Hans_ and `zh-Hans.json` doesn't exist
286
290
  * The output file is missing the reference key
291
+ * Example: You're translating reference key _error-msg_ to target language _zh-Hant.jso_ and `zh-Hans.json` does not have a key/value pair for key _error-msg_
287
292
  * The reference value was modified
288
- * A context value for the given target language/key is found and has been modified.
293
+ * Example: You change the value of _some-key_ in your reference file
294
+ * A context value for the given target language/key is found and has been modified
295
+ * Example: You modify the value of _context:error-msg_ in your reference file. _error-msg_ will be re-translated for all target languages.
289
296
  * `-f` or `--force` are specified
290
297
  * The cache file (`.localization.cache.json`) is not present
291
298
 
292
- Translation will _not_ occur if `alt` detects that the given value in the target language file has been manually modified. If you modify an output value manually and want it to be re-translated
299
+ NOTE: Translation will _not_ occur if ALT detects that the given value in the target language file has been manually modified. If you modify an output value manually and want it to be re-translated
293
300
  later, you can just delete that key/value pair from the given file.
294
301
 
295
302
  ## Additional notes
296
303
  ### Delayed vs. realtime writes
297
- By default, `alt` will not write to disk until the tool is shutting down (including SIGTERM – yes, `Ctrl+C` is safe).
304
+ By default, ALT will not write to disk until the tool is shutting down (including SIGTERM – yes, `Ctrl+C` is safe).
298
305
 
299
306
  This behavior is useful if your application is monitoring the output directory and you don't want your server
300
307
  constantly restarting, for example.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@drone1/alt",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "description": "An AI-powered localization tool",
6
6
  "main": "src/index.mjs",
7
7
  "bin": {