Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/twine.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Celis <sebastian@sebastiancelis.com>2017-05-21 00:35:37 +0300
committerSebastian Celis <sebastian@sebastiancelis.com>2017-05-21 00:35:37 +0300
commit19b53343c690ab247b40f271585ff8171845bb74 (patch)
tree7119476a6d3f78291383486c32fa2f16ada38bee /README.md
parente863aa60810520ba6bf5b994dfc4ff82b599de8e (diff)
Update readme
Diffstat (limited to 'README.md')
-rw-r--r--README.md89
1 files changed, 38 insertions, 51 deletions
diff --git a/README.md b/README.md
index ee450d5..0c33dc4 100644
--- a/README.md
+++ b/README.md
@@ -6,23 +6,10 @@ Twine is a command line tool for managing your strings and their translations. T
## Install
-### As a Gem
-
Twine is most easily installed as a Gem.
$ gem install twine
-### From Source
-
-You can also run Twine directly from source. However, it requires [rubyzip][rubyzip] in order to create and read standard zip files.
-
- $ gem install rubyzip
- $ git clone git://github.com/mobiata/twine.git
- $ cd twine
- $ ./twine --help
-
-Make sure you run the `twine` executable at the root of the project as it properly sets up your Ruby library path. The `bin/twine` executable does not.
-
## Twine File Format
Twine stores everything in a single file, the Twine data file. The format of this file is a slight variant of the [Git][git] config file format, which itself is based on the old [Windows INI file][INI] format. The entire file is broken up into sections, which are created by placing the section name between two pairs of square brackets. Sections are optional, but they are the recommended way of grouping your definitions into smaller, more manageable chunks.
@@ -50,39 +37,39 @@ If you want a definition to inherit the values of another definition, you can us
### Example
```ini
- [[General]]
- [yes]
- en = Yes
- es = Sí
- fr = Oui
- ja = はい
- [no]
- en = No
- fr = Non
- ja = いいえ
-
- [[Errors]]
- [path_not_found_error]
- en = The file '%@' could not be found.
- tags = app1,app6
- comment = An error describing when a path on the filesystem could not be found.
- [network_unavailable_error]
- en = The network is currently unavailable.
- tags = app1
- comment = An error describing when the device can not connect to the internet.
- [dismiss_error]
- ref = yes
- en = Dismiss
-
- [[Escaping Example]]
- [list_item_separator]
- en = `, `
- tags = mytag
- comment = A string that should be placed between multiple items in a list. For example: Red, Green, Blue
- [grave_accent_quoted_string]
- en = ``%@``
- tags = myothertag
- comment = This string will evaluate to `%@`.
+[[General]]
+ [yes]
+ en = Yes
+ es = Sí
+ fr = Oui
+ ja = はい
+ [no]
+ en = No
+ fr = Non
+ ja = いいえ
+
+[[Errors]]
+ [path_not_found_error]
+ en = The file '%@' could not be found.
+ tags = app1,app6
+ comment = An error describing when a path on the filesystem could not be found.
+ [network_unavailable_error]
+ en = The network is currently unavailable.
+ tags = app1
+ comment = An error describing when the device can not connect to the internet.
+ [dismiss_error]
+ ref = yes
+ en = Dismiss
+
+[[Escaping Example]]
+ [list_item_separator]
+ en = `, `
+ tags = mytag
+ comment = A string that should be placed between multiple items in a list. For example: Red, Green, Blue
+ [grave_accent_quoted_string]
+ en = ``%@``
+ tags = myothertag
+ comment = This string will evaluate to `%@`.
```
## Supported Output Formats
@@ -184,11 +171,11 @@ Now, whenever you build your application, Xcode will automatically invoke Twine
Add the following task at the top level in app/build.gradle:
```
task generateLocalizations {
- String script = 'if hash twine 2>/dev/null; then twine generate-localization-file twine.txt ./src/main/res/values/generated_strings.xml; fi'
- exec {
- executable "sh"
- args '-c', script
- }
+ String script = 'if hash twine 2>/dev/null; then twine generate-localization-file twine.txt ./src/main/res/values/generated_strings.xml; fi'
+ exec {
+ executable "sh"
+ args '-c', script
+ }
}
```