translatomatic 0.1.3 → 0.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.
Files changed (139) hide show
  1. checksums.yaml +5 -5
  2. data/.gitattributes +20 -20
  3. data/.gitignore +19 -15
  4. data/.rspec +3 -3
  5. data/.rubocop.yml +28 -0
  6. data/.translatomatic/config.yml +4 -0
  7. data/.travis.yml +4 -6
  8. data/.yardopts +9 -9
  9. data/Gemfile +8 -4
  10. data/Guardfile +4 -5
  11. data/README.de.md +55 -50
  12. data/README.en.md +177 -0
  13. data/README.es.md +53 -48
  14. data/README.fr.md +53 -48
  15. data/README.it.md +54 -49
  16. data/README.ja.md +63 -58
  17. data/README.ko.md +59 -54
  18. data/README.md +17 -13
  19. data/README.ms.md +50 -45
  20. data/README.pt.md +54 -49
  21. data/README.ru.md +57 -52
  22. data/README.sv.md +51 -46
  23. data/README.zh.md +60 -55
  24. data/Rakefile +3 -3
  25. data/TODO.txt +6 -0
  26. data/bin/console +3 -3
  27. data/bin/translatomatic +4 -2
  28. data/config/i18n-tasks.yml +130 -0
  29. data/config/locales/translatomatic/de.yml +141 -99
  30. data/config/locales/translatomatic/en.yml +129 -89
  31. data/config/locales/translatomatic/es.yml +136 -99
  32. data/config/locales/translatomatic/fr.yml +139 -100
  33. data/config/locales/translatomatic/it.yml +135 -97
  34. data/config/locales/translatomatic/ja.yml +137 -98
  35. data/config/locales/translatomatic/ko.yml +138 -98
  36. data/config/locales/translatomatic/ms.yml +138 -100
  37. data/config/locales/translatomatic/pt.yml +137 -101
  38. data/config/locales/translatomatic/ru.yml +136 -98
  39. data/config/locales/translatomatic/sv.yml +134 -96
  40. data/config/locales/translatomatic/zh.yml +136 -97
  41. data/db/migrate/201712170000_initial.rb +2 -3
  42. data/lib/translatomatic.rb +40 -25
  43. data/lib/translatomatic/cli.rb +5 -1
  44. data/lib/translatomatic/cli/base.rb +61 -58
  45. data/lib/translatomatic/cli/common_options.rb +14 -11
  46. data/lib/translatomatic/cli/config.rb +96 -91
  47. data/lib/translatomatic/cli/database.rb +85 -23
  48. data/lib/translatomatic/cli/main.rb +158 -104
  49. data/lib/translatomatic/cli/thor.rb +29 -0
  50. data/lib/translatomatic/cli/translate.rb +134 -157
  51. data/lib/translatomatic/config.rb +10 -301
  52. data/lib/translatomatic/config/display.rb +78 -0
  53. data/lib/translatomatic/config/files.rb +60 -0
  54. data/lib/translatomatic/config/location_settings.rb +133 -0
  55. data/lib/translatomatic/config/options.rb +68 -0
  56. data/lib/translatomatic/config/selector.rb +127 -0
  57. data/lib/translatomatic/config/settings.rb +148 -0
  58. data/lib/translatomatic/converter.rb +40 -28
  59. data/lib/translatomatic/database.rb +127 -110
  60. data/lib/translatomatic/define_options.rb +4 -5
  61. data/lib/translatomatic/escaped_unicode.rb +86 -76
  62. data/lib/translatomatic/extractor.rb +5 -2
  63. data/lib/translatomatic/extractor/base.rb +12 -12
  64. data/lib/translatomatic/extractor/ruby.rb +7 -6
  65. data/lib/translatomatic/file_translator.rb +101 -244
  66. data/lib/translatomatic/flattenation.rb +39 -0
  67. data/lib/translatomatic/http.rb +13 -0
  68. data/lib/translatomatic/http/client.rb +144 -0
  69. data/lib/translatomatic/http/exception.rb +43 -0
  70. data/lib/translatomatic/http/file_param.rb +27 -0
  71. data/lib/translatomatic/http/param.rb +37 -0
  72. data/lib/translatomatic/http/request.rb +91 -0
  73. data/lib/translatomatic/i18n.rb +43 -0
  74. data/lib/translatomatic/locale.rb +71 -59
  75. data/lib/translatomatic/logger.rb +43 -28
  76. data/lib/translatomatic/metadata.rb +58 -0
  77. data/lib/translatomatic/model.rb +4 -2
  78. data/lib/translatomatic/model/locale.rb +5 -5
  79. data/lib/translatomatic/model/text.rb +5 -5
  80. data/lib/translatomatic/option.rb +57 -34
  81. data/lib/translatomatic/path_utils.rb +126 -0
  82. data/lib/translatomatic/progress_updater.rb +13 -16
  83. data/lib/translatomatic/provider.rb +101 -0
  84. data/lib/translatomatic/provider/base.rb +136 -0
  85. data/lib/translatomatic/provider/frengly.rb +55 -0
  86. data/lib/translatomatic/provider/google.rb +78 -0
  87. data/lib/translatomatic/provider/google_web.rb +50 -0
  88. data/lib/translatomatic/provider/microsoft.rb +144 -0
  89. data/lib/translatomatic/provider/my_memory.rb +75 -0
  90. data/lib/translatomatic/provider/yandex.rb +61 -0
  91. data/lib/translatomatic/resource_file.rb +59 -53
  92. data/lib/translatomatic/resource_file/base.rb +171 -237
  93. data/lib/translatomatic/resource_file/csv.rb +176 -24
  94. data/lib/translatomatic/resource_file/html.rb +21 -42
  95. data/lib/translatomatic/resource_file/key_value_support.rb +117 -0
  96. data/lib/translatomatic/resource_file/markdown.rb +36 -38
  97. data/lib/translatomatic/resource_file/plist.rb +121 -126
  98. data/lib/translatomatic/resource_file/po.rb +104 -82
  99. data/lib/translatomatic/resource_file/properties.rb +48 -77
  100. data/lib/translatomatic/resource_file/properties.treetop +87 -0
  101. data/lib/translatomatic/resource_file/resw.rb +56 -41
  102. data/lib/translatomatic/resource_file/subtitle.rb +86 -54
  103. data/lib/translatomatic/resource_file/text.rb +18 -18
  104. data/lib/translatomatic/resource_file/xcode_strings.rb +32 -63
  105. data/lib/translatomatic/resource_file/xcode_strings.treetop +85 -0
  106. data/lib/translatomatic/resource_file/xml.rb +94 -81
  107. data/lib/translatomatic/resource_file/yaml.rb +54 -68
  108. data/lib/translatomatic/retry_executor.rb +37 -0
  109. data/lib/translatomatic/slurp.rb +32 -0
  110. data/lib/translatomatic/string_batcher.rb +50 -0
  111. data/lib/translatomatic/string_escaping.rb +61 -0
  112. data/lib/translatomatic/text.rb +263 -0
  113. data/lib/translatomatic/text_collection.rb +66 -0
  114. data/lib/translatomatic/tmx.rb +5 -3
  115. data/lib/translatomatic/tmx/document.rb +107 -82
  116. data/lib/translatomatic/tmx/translation_unit.rb +19 -18
  117. data/lib/translatomatic/translation.rb +8 -28
  118. data/lib/translatomatic/translation/collection.rb +199 -0
  119. data/lib/translatomatic/translation/fetcher.rb +123 -0
  120. data/lib/translatomatic/translation/munging.rb +112 -0
  121. data/lib/translatomatic/translation/result.rb +50 -0
  122. data/lib/translatomatic/translation/sharer.rb +32 -0
  123. data/lib/translatomatic/translation/stats.rb +44 -0
  124. data/lib/translatomatic/translator.rb +91 -88
  125. data/lib/translatomatic/type_cast.rb +63 -0
  126. data/lib/translatomatic/util.rb +37 -33
  127. data/lib/translatomatic/version.rb +2 -2
  128. data/translatomatic.gemspec +57 -46
  129. metadata +136 -59
  130. data/lib/translatomatic/http_request.rb +0 -162
  131. data/lib/translatomatic/string.rb +0 -188
  132. data/lib/translatomatic/translation_result.rb +0 -86
  133. data/lib/translatomatic/translation_stats.rb +0 -31
  134. data/lib/translatomatic/translator/base.rb +0 -128
  135. data/lib/translatomatic/translator/frengly.rb +0 -62
  136. data/lib/translatomatic/translator/google.rb +0 -37
  137. data/lib/translatomatic/translator/microsoft.rb +0 -41
  138. data/lib/translatomatic/translator/my_memory.rb +0 -68
  139. data/lib/translatomatic/translator/yandex.rb +0 -56
data/README.it.md CHANGED
@@ -2,38 +2,38 @@
2
2
 
3
3
  # Translatomatic
4
4
 
5
- Converte file di testo da una lingua a altra, o da un formato a altro. Attualmente sono supportati i seguenti formati di file:
5
+ Traduce i file di testo da una lingua all'altra o da un formato all'altro. I seguenti formati di file sono attualmente supportati:
6
6
 
7
- | Formato di file | Estensioni |
7
+ | Formato del file | estensioni |
8
8
  | --- | --- |
9
9
  | [Proprietà](https://en.wikipedia.org/wiki/.properties) | `.properties` |
10
10
  | File di risorse di Windows | `.resw, .resx` |
11
- | [Elenchi di proprietà](https://en.wikipedia.org/wiki/Property_list) (OSX plist) | `.plist` |
11
+ | [Elenchi di proprietà](https://en.wikipedia.org/wiki/Property_list) (Pliste di OSX) | `.plist` |
12
12
  | [File PO](https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html) | `.po, .pot` |
13
- | [XCode stringhe](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/LoadingResources/Strings/Strings.html) | `.strings` |
13
+ | [Stringhe XCode](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/LoadingResources/Strings/Strings.html) | `.strings` |
14
14
  | [YAML](http://yaml.org/) | `.yaml` |
15
15
  | Sottotitoli | `.srt, .ass, .ssa` |
16
16
  | HTML | `.html, .htm, .shtml` |
17
17
  | XML | `.xml` |
18
- | [Markdown](https://en.wikipedia.org/wiki/Markdown) | `.md` |
19
- | I file di testo | `.txt` |
18
+ | [riduione di prezzo](https://en.wikipedia.org/wiki/Markdown) | `.md` |
19
+ | File di testo | `.txt` |
20
20
  | File CSV | `.csv` |
21
21
 
22
- La seguente traduzione API può essere utilizzata con Translatomatic:
22
+ I seguenti provider di traduzione possono essere utilizzati con Translatomatic:
23
23
 
24
24
  - [Google](https://cloud.google.com/translate/)
25
25
  - [Microsoft](https://www.microsoft.com/en-us/translator/translatorapi.aspx)
26
26
  - [Yandex](https://tech.yandex.com/translate/)
27
- - [MyMemory](https://mymemory.translated.net/doc/)
27
+ - [La mia memoria](https://mymemory.translated.net/doc/)
28
28
  - [Frengly](http://www.frengly.com/api)
29
29
 
30
- Tradotto le stringhe vengono salvati in un database e riutilizzati.
30
+ Le stringhe tradotte vengono salvate in un database e riutilizzate.
31
31
 
32
32
  * * *
33
33
 
34
- # # Installazione
34
+ ## Installazione
35
35
 
36
- Aggiungere questa riga al file dell'applicazione `Gemfile`:
36
+ Aggiungi questa linea alle tue applicazioni `Gemfile`:
37
37
 
38
38
  `ruby
39
39
  gem 'translatomatic'
@@ -43,104 +43,108 @@ E poi eseguire:
43
43
 
44
44
  $ bundle
45
45
 
46
- O installare da soli come:
46
+ Oppure installalo tu stesso come:
47
47
 
48
48
  $ gem install translatomatic
49
49
 
50
50
  * * *
51
51
 
52
- # # L'utilizzo
52
+ ## Utilizzo
53
53
 
54
- Questo gioiello fornisce un eseguibile chiamato `translatomatic`. Il `translatomatic` comando ha un numero di funzioni, dei quali non tutti sono documentati qui. Per aiuto sulle opzioni e comandi disponibili, eseguire:
54
+ Questa gemma fornisce un eseguibile chiamato `translatomatic`. Il `translatomatic` il comando ha un numero di funzioni, non tutte documentate qui. Per assistenza su comandi e opzioni disponibili, eseguire:
55
55
 
56
56
  $ translatomatic help
57
57
 
58
- E per un aiuto su un comando, eseguire:
58
+ E per aiuto su un comando, esegui:
59
59
 
60
60
  $ translatomatic translate help
61
61
  $ translatomatic translate help file
62
62
 
63
63
  * * *
64
64
 
65
- # # Installazione
65
+ ## Impostare
66
66
 
67
- Controllare i servizi di traduzione disponibili e opzioni con la `services` comando:
67
+ Controlla i fornitori di servizi di traduzione disponibili e le opzioni con `providers` comando:
68
68
 
69
- $ translatomatic services
69
+ $ translatomatic providers
70
70
 
71
- Opzioni possono essere specificate nella riga di comando, nelle variabili di ambiente, o nei file di configurazione di translatomatic. La configurazione del file possono essere modificati utilizzando translatomatic interna del `config` comando. Per elencare tutte le impostazioni di configurazione disponibili, utilizzare:
71
+ Le opzioni possono essere specificate sulla riga di comando, nelle variabili di ambiente o nei file di configurazione di translatomatic. I file di configurazione possono essere modificati usando l'interno di translatomatic `config` comando. Per elencare tutte le impostazioni di configurazione disponibili, utilizzare:
72
72
 
73
73
  $ translatomatic config list
74
74
  $ translatomatic config describe
75
75
 
76
- Opzioni possono essere impostate a livello di utente o livello di progetto. Vedi anche la sezione di configurazione sotto per ulteriori informazioni.
76
+ Le opzioni possono essere impostate a livello di utente o di progetto. Vedi anche la sezione Configurazione di seguito per maggiori informazioni.
77
77
 
78
78
  * * *
79
79
 
80
- # # Traduzione di file
80
+ ## Tradurre i file
81
81
 
82
- Quando si converte il file, `translatomatic` traduce il testo una frase o una frase alla volta. Se un file è ri-tradotto, soli frasi che sono stati modificati dopo l'ultima traduzione vengono inviati al traduttore, e il resto sono provenienti dal database locale.
82
+ Quando si traducono i file, `translatomatic` traduce il testo una frase o frase alla volta. Se un file viene tradotto nuovamente, solo le frasi che sono state modificate dall'ultima traduzione vengono inviate al fornitore di traduzioni e il resto viene estratto dal database locale.
83
83
 
84
- Per tradurre un file di proprietà Java in tedesco e francese utilizzando il traduttore di Google:
84
+ Per tradurre un file di proprietà Java in tedesco e francese utilizzando il fornitore di Google:
85
85
 
86
- $ translatomatic translate file --translator Google strings.properties de,fr
86
+ $ translatomatic translate file --provider Google strings.properties de,fr
87
87
 
88
- Questo permetterebbe di creare (o sovrascrivere) `strings_de.properties` e `strings_fr.properties` con proprietà tradotta.
88
+ Questo creerebbe (o sovrascriverà) `strings_de.properties` e `strings_fr.properties` con proprietà tradotte.
89
89
 
90
90
  ### Visualizzazione di stringhe da un pacchetto di risorse
91
91
 
92
- Per leggere e visualizzare il `store.description` e `store.name` proprietà dal file di risorse locali in inglese, tedesco e francese:
92
+ Per leggere e visualizzare il `store.description` e `store.name` proprietà da file di risorse locali in inglese, tedesco e francese:
93
93
 
94
94
  $ translatomatic display --locales=en,de,fr \
95
95
  resources/strings.properties store.description store.name
96
96
 
97
- ### Estrarre le stringhe dal file di origine
97
+ ### Estrazione di stringhe dai file di origine
98
98
 
99
- Per estrarre le stringhe dal file di origine, utilizzare il `strings` comando, ad es.
99
+ Per estrarre le stringhe dai file di origine, utilizzare il `strings` comando, ad es
100
100
 
101
101
  $ translatomatic strings file.rb
102
102
 
103
103
  * * *
104
104
 
105
- # # Conversione di file
105
+ ## Conversione di file
106
106
 
107
- Translatomatic può essere utilizzato per convertire file da un formato a altro. Ad esempio, per convertire un Java file di proprietà a un XCode stringhe di file:
107
+ Translatomatic può essere utilizzato per convertire file da un formato all'altro. Ad esempio, per convertire un file di proprietà Java in un file di stringhe XCode:
108
108
 
109
109
  $ translatomatic convert strings.properties Localization.strings
110
110
 
111
111
  * * *
112
112
 
113
- # # Configurazione
113
+ ## Configurazione
114
114
 
115
- Translatomatic è un file di configurazione per utente alle `$HOME/.translatomatic/config.yml`e, facoltativamente, una per ogni file di configurazione di progetto `$PROJECT_DIR/.translatomatic/config.yml`. Ile `translatomatic config set` comando opera sulla configurazione del livello di progetto quando viene eseguito all'interno di un progetto contenente un file di configurazione translatomatic.In caso contrario viene modificato il file di configurazione a livello di utente. The `--context` opzione può essere utilizzata per specificare `user` o `project` configurazione del livello. Il valore effettivo di un'opzione di configurazione è determinato dalla lettura dall'ambiente, il file di configurazione a livello di utente, il file di configurazione a livello di progetto (se presente) e dalla riga di comando. L'ultimo valore trovato hanno la precedenza sui valori letti in precedenza.
115
+ Le impostazioni di configurazione possono essere lette e scritte usando il `config get` e `config set` comandi. Translatomatic utilizza un file di configurazione utente su `$HOME/.translatomatic/config.yml`e facoltativamente un file di configurazione per progetto `$PROJECT_DIR/.translatomatic/config.yml`.
116
116
 
117
- ### Esempi di configurazione di Translatomatic
117
+ Il `--user` e `--project` le opzioni possono essere utilizzate per dire al comando di leggere o scrivere su `user` o `project` configurazione.
118
118
 
119
- Per impostare `google_api_key` all'interno del file di configurazione utente, utilizzare:
119
+ Le impostazioni di configurazione vengono lette dalle variabili di ambiente, dal file di configurazione utente, dal file di configurazione del progetto (se presente) e dalla riga di comando. L'ultimo valore trovato ha la precedenza sui valori letti in precedenza.
120
120
 
121
- $ translatomatic config set google_api_key value --context user
121
+ Quando si scrive sulla configurazione con `config set` comando, il nuovo valore viene scritto nel file di configurazione del progetto quando viene eseguito all'interno di un progetto contenente un file di configurazione translatomatico o il file di configurazione utente se non esiste un file di configurazione del progetto.
122
122
 
123
- Per impostare uno o più servizi di traduzione da utilizzare:
123
+ ### Esempi di configurazione traslatomica
124
+
125
+ Impostare `google_api_key` all'interno del file di configurazione utente, utilizzare:
124
126
 
125
- $ translatomatic config set translator Microsoft,Yandex
127
+ $ translatomatic config set google_api_key value --user
128
+
129
+ Per impostare uno o più servizi di traduzione da utilizzare:
126
130
 
127
- Traduttori secondari solo essere utilizzati se si verifica un errore di traduzione quando si utilizza la prima scelta.
131
+ $ translatomatic config set provider Microsoft,Yandex
128
132
 
129
- Per impostare un elenco predefinito delle impostazioni locali di destinazione:
133
+ Per impostare un elenco predefinito di impostazioni locali di destinazione:
130
134
 
131
135
  $ translatomatic config set target_locales en,de,es,fr,it
132
136
 
133
- Con `target_locales` impostata, il file possono essere tradotto senza specificare impostazioni locali di destinazione nella `translate file` comando.
137
+ Con `target_locales` set, i file possono essere tradotti senza specificare localizzazioni di destinazione nel file `translate file` comando.
134
138
 
135
139
  $ translatomatic translate file resources/strings.properties
136
140
 
137
- Per visualizzare la configurazione corrente, eseguire
141
+ Per visualizzare la configurazione corrente, eseguire:
138
142
 
139
143
  $ translatomatic config list
140
144
 
141
145
  ### Configurazione del database
142
146
 
143
- Per impostazione predefinita, `translatomatic` utilizza un database sqlite3 in `$HOME/.translatomatic/translatomatic.sqlite3` per memorizzare stringhe tradotte. Per memorizzare traduzioni in un database, è necessario un adattatore di database appropriato installato, come il `sqlite3` gemma. Translatomatic non installa automaticamente schede di database. La configurazione del database può essere modificata mediante la creazione di un `database.yml` file sotto `$HOME/.translatomatic/database.yml` per il `production` ambiente, ad es.
147
+ Di default, `translatomatic` utilizza un database sqlite3 in `$HOME/.translatomatic/translatomatic.sqlite3` per memorizzare stringhe tradotte. La configurazione del database può essere modificata creando un `database.yml` file sotto `$HOME/.translatomatic/database.yml` per il `production` ambiente, ad es
144
148
 
145
149
  production:
146
150
  adapter: mysql2
@@ -148,25 +152,26 @@ Per impostazione predefinita, `translatomatic` utilizza un database sqlite3 in `
148
152
  database: translatomatic
149
153
  pool: 5
150
154
  encoding: utf8
155
+ collation: utf8_bin
151
156
  username: username
152
157
  password: password
153
158
 
154
159
  * * *
155
160
 
156
- # # Contribuendo
161
+ ## Contribuire
157
162
 
158
- Le segnalazioni di Bug e tirare le richieste sono i benvenuti su GitHub a https://github.com/smugglys/translatomatic. Questo progetto è destinato ad essere un sicuro e accogliente spazio per la collaborazione, e i collaboratori sono tenuti a rispettare i [Collaboratore Alleanza](http://contributor-covenant.org) codice di condotta.
163
+ Segnalazioni di bug e richieste di pull sono benvenute su GitHub all'indirizzo https://github.com/smugglys/translatomatic. Questo progetto vuole essere uno spazio sicuro e accogliente per la collaborazione e ci si aspetta che i contributori aderiscano al [Patto del collaboratore](http://contributor-covenant.org) codice di condotta.
159
164
 
160
165
  * * *
161
166
 
162
- # # Licenza
167
+ ## Licenza
163
168
 
164
- Il gioiello è disponibile come open source sotto i termini della [La Licenza MIT](https://opensource.org/licenses/MIT).
169
+ La gemma è disponibile come open source secondo i termini di [Licenza MIT](https://opensource.org/licenses/MIT).
165
170
 
166
171
  * * *
167
172
 
168
- # # Codice di condotta
173
+ ## Codice di condotta
169
174
 
170
- Tutti interagendo con il Translatomatic progetto di basi di codice, issue tracker, chat e mailing list dovrebbe seguire l' [codice di condotta](https://github.com/smugglys/translatomatic/blob/master/CODE_OF_CONDUCT.md).
175
+ Si prevede che tutti coloro che interagiscono con le basi di codice del progetto Translatomatic, gli inseguitori di problemi, le chat room e le mailing list seguano il [codice di condotta](https://github.com/smugglys/translatomatic/blob/master/CODE_OF_CONDUCT.md).
171
176
 
172
- _Creato da Translatomatic 0.1.2 Sat, 06 Jan 2018 22:56:23 +1030_
177
+ _Creato da Translatomatic 0.1.3 Tue, 06 Feb 2018 22:18:17 +1030 https://github.com/smugglys/translatomatic_
data/README.ja.md CHANGED
@@ -1,146 +1,150 @@
1
1
  [![Documentation](http://img.shields.io/badge/yard-docs-blue.svg)](http://www.rubydoc.info/gems/translatomatic)[![Gem Version](https://badge.fury.io/rb/translatomatic.svg)](https://badge.fury.io/rb/translatomatic)[![Build Status](https://travis-ci.org/smugglys/translatomatic.svg?branch=master)](https://travis-ci.org/smugglys/translatomatic)[![Code Climate](https://codeclimate.com/github/smugglys/translatomatic.svg)](https://codeclimate.com/github/smugglys/translatomatic)
2
2
 
3
- # Translatomatic
3
+ # 翻訳者
4
4
 
5
- 別に 1 つの言語または別の 1 つの形式からテキスト ファイルに変換します。 次のファイル形式がサポートされています。
5
+ テキストファイルをある言語から別の言語に、ある形式から別の形式に翻訳します。 現在サポートされているファイル形式は次のとおりです。
6
6
 
7
- | ファイルの形式 | 拡張機能 |
7
+ | ファイル形式 | 拡張機能 |
8
8
  | --- | --- |
9
- | [特性](https://en.wikipedia.org/wiki/.properties) | `.properties` |
10
- | Windows リソース ファイル | `.resw, .resx` |
11
- | [物件リスト](https://en.wikipedia.org/wiki/Property_list) (OSX plist) | `.plist` |
12
- | [PO ファイル](https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html) | `.po, .pot` |
13
- | [XCodeの文字列](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/LoadingResources/Strings/Strings.html) | `.strings` |
9
+ | [プロパティ](https://en.wikipedia.org/wiki/.properties) | `.properties` |
10
+ | Windowsリソースファイル | `.resw, .resx` |
11
+ | [プロパティリスト](https://en.wikipedia.org/wiki/Property_list) OSX plist | `.plist` |
12
+ | [POファイル](https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html) | `.po, .pot` |
13
+ | [XCode文字列](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/LoadingResources/Strings/Strings.html) | `.strings` |
14
14
  | [YAML](http://yaml.org/) | `.yaml` |
15
15
  | 字幕 | `.srt, .ass, .ssa` |
16
16
  | HTML | `.html, .htm, .shtml` |
17
17
  | XML | `.xml` |
18
- | [値下げ](https://en.wikipedia.org/wiki/Markdown) | `.md` |
18
+ | [マークダウン](https://en.wikipedia.org/wiki/Markdown) | `.md` |
19
19
  | テキストファイル | `.txt` |
20
- | CSV ファイル | `.csv` |
20
+ | CSVファイル | `.csv` |
21
21
 
22
- 次の翻訳 Api は、Translatomatic で使用できます。
22
+ Translatomaticでは、次の翻訳プロバイダを使用できます。
23
23
 
24
24
  - [Google](https://cloud.google.com/translate/)
25
25
  - [マイクロソフト](https://www.microsoft.com/en-us/translator/translatorapi.aspx)
26
- - [Yandex](https://tech.yandex.com/translate/)
27
- - [MyMemory](https://mymemory.translated.net/doc/)
28
- - [Frengly](http://www.frengly.com/api)
26
+ - [ヤンデックス](https://tech.yandex.com/translate/)
27
+ - [私の思い出](https://mymemory.translated.net/doc/)
28
+ - [強く](http://www.frengly.com/api)
29
29
 
30
- 翻訳文字列に保存されたデータベースの再利用されます。
30
+ 翻訳された文字列はデータベースに保存され、再利用されます。
31
31
 
32
32
  * * *
33
33
 
34
- ## インストール
34
+ ##インストール
35
35
 
36
- この機能を追加ラインの中から必要なものを選んで使用 `Gemfile`:
36
+ この行をアプリケーションに追加する `Gemfile`:
37
37
 
38
38
  `ruby
39
39
  gem 'translatomatic'
40
40
  `
41
41
 
42
- そして実行す:
42
+ そして、以下を実行します:
43
43
 
44
44
  $ bundle
45
45
 
46
- インストールで自分自身:
46
+ または、自分でインストールしてください:
47
47
 
48
48
  $ gem install translatomatic
49
49
 
50
50
  * * *
51
51
 
52
- ## の使用
52
+ ## 使用法
53
53
 
54
- この宝石と呼ばれる実行可能ファイルを提供します。 `translatomatic`ます。 `translatomatic` コマンドは、いくつかのここに記載されているすべての機能を持ちます。 利用可能なコマンドとオプションに関するヘルプを実行します。
54
+ この宝石は、 `translatomatic`。 `translatomatic` コマンドにはいくつかの機能がありますが、そのすべてがここに記載されているわけではありません。 使用可能なコマンドとオプションのヘルプについては、次のコマンドを実行してください。
55
55
 
56
56
  $ translatomatic help
57
57
 
58
- ヘルプ コマンドが実行します。
58
+ コマンドのヘルプを表示するには、次のコマンドを実行します。
59
59
 
60
60
  $ translatomatic translate help
61
61
  $ translatomatic translate help file
62
62
 
63
63
  * * *
64
64
 
65
- ## セットアップ
65
+ ## セットアップ
66
66
 
67
- 利用可能な翻訳サービスとオプションを確認、 `services` コマンド:
67
+ 利用可能な翻訳プロバイダとオプションが `providers` コマンド:
68
68
 
69
- $ translatomatic services
69
+ $ translatomatic providers
70
70
 
71
- オプションは、コマンドライン、環境変数、または translatomatic の構成ファイルで指定することができます。 Translatomatic を使用してファイルを変更することができます構成の内部 `config` コマンドです。 すべての利用可能な構成設定を一覧表示するには、使用します。
71
+ オプションは、コマンドライン、環境変数、または翻訳の設定ファイルで指定できます。 構成ファイルは、translatomaticの内部 `config` コマンド。 使用可能なすべての構成設定を一覧表示するには、
72
72
 
73
73
  $ translatomatic config list
74
74
  $ translatomatic config describe
75
75
 
76
- オプションは、ユーザー レベルまたはプロジェクト レベルで設定することができます。 詳細については、後述の構成も参照してください。
76
+ オプションは、ユーザーレベルまたはプロジェクトレベルで設定できます。 詳細については、以下の設定セクションも参照してください。
77
77
 
78
78
  * * *
79
79
 
80
- ## ファイルの翻訳
80
+ ##ファイルの翻訳
81
81
 
82
- ファイルを変換するとき `translatomatic` 変換テキストの文章や言葉です。 ファイルが再翻訳された場合、最後の翻訳から変更されている唯一の文は翻訳者に送信され、残りの部分は、ローカル データベースから供給されます。
82
+ ファイルを翻訳するときは、 `translatomatic` 一度に1つの文または句を翻訳します。 ファイルが再翻訳されると、最後の翻訳後に変更された文のみが翻訳プロバイダに送信され、残りはローカルデータベースから供給されます。
83
83
 
84
- ドイツ語とフランス語の Google 翻訳を使用して Java のプロパティ ファイルを翻訳。
84
+ Googleプロバイダを使用してJavaプロパティファイルをドイツ語とフランス語に翻訳するには:
85
85
 
86
- $ translatomatic translate file --translator Google strings.properties de,fr
86
+ $ translatomatic translate file --provider Google strings.properties de,fr
87
87
 
88
- こうした成(上書き) `strings_de.properties` - `strings_fr.properties` 変換のプロパティを実行します。
88
+ これにより、 `strings_de.properties` そして `strings_fr.properties` 翻訳されたプロパティで。
89
89
 
90
- ### 表示文字列からリソースバンドル
90
+ ### リソースバンドルからの文字列の表示
91
91
 
92
- 読みを表示 `store.description` - `store.name` 物件からの現地リソースファイル、英語、ドイツ、フランス語:
92
+ を読み、表示するには `store.description` そして `store.name` 英語、ドイツ語、フランス語のローカルリソースファイルのプロパティ:
93
93
 
94
94
  $ translatomatic display --locales=en,de,fr \
95
95
  resources/strings.properties store.description store.name
96
96
 
97
- ### 抽出から文字列をソースファイル
97
+ ### ソースファイルからの文字列の抽出
98
98
 
99
- ソース ファイルから文字列を抽出するを使用、 `strings` コマンド例。
99
+ ソースファイルから文字列を抽出するには、 `strings` コマンド、例えば
100
100
 
101
101
  $ translatomatic strings file.rb
102
102
 
103
103
  * * *
104
104
 
105
- ## ファイルを変換します。
105
+ ##ファイルを変換する
106
106
 
107
- Translatomatic を使用して、1 つの形式から別のファイルを変換できます。 たとえば、Java に変換する、XCode をプロパティ ファイル文字列ファイル。
107
+ Translatomaticを使用して、ファイルをあるフォーマットから別のフォーマットに変換することができます。 たとえば、JavaプロパティファイルをXCode文字列ファイルに変換するには、次のようにします。
108
108
 
109
109
  $ translatomatic convert strings.properties Localization.strings
110
110
 
111
111
  * * *
112
112
 
113
- ## 構成
113
+ ##設定
114
114
 
115
- Translatomatic は、ユーザーごとの構成ファイル `$HOME/.translatomatic/config.yml`、および必要に応じて、プロジェクト構成ファイルあたり `$PROJECT_DIR/.translatomatic/config.yml`ます。 、e `translatomatic config set` コマンドは、プロジェクト レベルの構成 translatomatic 構成ファイルを含むプロジェクト内で実行されたときに動作します。うでなければユーザー レベルの構成ファイルが変更されます。 The `--context` 指定するオプションを使用できます。 `user` または `project` レベルの構成。 構成オプションの有効な値は、環境、ユーザー レベルの構成ファイル、プロジェクト レベルの構成ファイル (存在する場合)、およびコマンド ・ ラインからの読書によって決まります。 最後の値は、以前に読み取られた値よりも優先されます。
115
+ 設定を読み書きするには、 `config get` そして `config set` コマンド。 Translatomaticは、ユーザ設定ファイルを `$HOME/.translatomatic/config.yml`、オプションでプロジェクトごとの構成ファイル `$PROJECT_DIR/.translatomatic/config.yml`。
116
116
 
117
- ### Translatomatic の設定例
117
+ `--user` そして `--project` オプションを使用すると、コマンドに読み取りまたは書き込みを指示することができます。 `user` または `project` 構成。
118
118
 
119
- 設定するのには `google_api_key` ユーザー構成ファイル内で使用します。
119
+ 構成設定は、環境変数、ユーザー構成ファイル、プロジェクト構成ファイル(存在する場合)、およびコマンド行から読み取られます。 最後に見つかった値は、先に読み取った値よりも優先されます。
120
120
 
121
- $ translatomatic config set google_api_key value --context user
121
+ コンフィグレーションに `config set` 新しい値は、翻訳構成ファイルを含むプロジェクト内で実行された場合はプロジェクト構成ファイルに書き込まれ、プロジェクト構成ファイルが存在しない場合はユーザー構成ファイルに書き込まれます。
122
122
 
123
- 使用する 1 つまたは複数の翻訳サービスを設定: する
123
+ ### トランスレーションの設定例
124
124
 
125
- $ translatomatic config set translator Microsoft,Yandex
125
+ 設定するには `google_api_key` ユーザー構成ファイル内で、次のように使用します。
126
126
 
127
- 二次翻訳者は、最初の選択肢を使用する場合、変換エラーが発生した場合にのみ使用されます。
127
+ $ translatomatic config set google_api_key value --user
128
128
 
129
- ターゲットのロケールの既定の一覧を設定: する
129
+ 使用する翻訳サービスを1つ以上設定するには:
130
+
131
+ $ translatomatic config set provider Microsoft,Yandex
132
+
133
+ ターゲットロケールのデフォルトリストを設定するには:
130
134
 
131
135
  $ translatomatic config set target_locales en,de,es,fr,it
132
136
 
133
- と `target_locales` 設定すると、ファイルはターゲットのロケールを指定することがなく翻訳が可能、 `translate file` コマンドです。
137
+ と `target_locales` 設定すると、ターゲットロケールを指定せずにファイルを翻訳することができます。 `translate file` コマンド。
134
138
 
135
139
  $ translatomatic translate file resources/strings.properties
136
140
 
137
- 現在の構成を表示するには、を実行します。
141
+ 現在の設定を表示するには、次のコマンドを実行します。
138
142
 
139
143
  $ translatomatic config list
140
144
 
141
- ### データベースの構成
145
+ ### データベース構成
142
146
 
143
- デフォルトでは、 `translatomatic` を使用してsqlite3データベース `$HOME/.translatomatic/translatomatic.sqlite3` 店舗の翻訳の文字列です。 翻訳をデータベースに格納するようにインストールされている適切なデータベース アダプターが必要、 `sqlite3` 逸品です。 Translatomatic では、データベース アダプターを自動的にインストールされません。 データベースの構成を作成することによって変更できます、 `database.yml` ファイル `$HOME/.translatomatic/database.yml` のための `production` 環境、例えば
147
+ デフォルトでは、 `translatomatic` sqlite3データベースを使用 `$HOME/.translatomatic/translatomatic.sqlite3` 翻訳された文字列を格納します。 データベース構成は、 `database.yml` 下のファイル `$HOME/.translatomatic/database.yml` のために `production` 環境、例えば
144
148
 
145
149
  production:
146
150
  adapter: mysql2
@@ -148,25 +152,26 @@ Translatomatic は、ユーザーごとの構成ファイル `$HOME/.translatoma
148
152
  database: translatomatic
149
153
  pool: 5
150
154
  encoding: utf8
155
+ collation: utf8_bin
151
156
  username: username
152
157
  password: password
153
158
 
154
159
  * * *
155
160
 
156
- ## 貢献
161
+ ##寄稿
157
162
 
158
- バグ報告を引き要請を歓迎GitHubhttps://github.com/smugglys/translatomaticます。 このプロジェクトなどに対応できるようになっても安全で快適なスペースのための協力者が付着し [執筆規約](http://contributor-covenant.org) 行動規範です。
163
+ バグ報告とプルリクエストは、GitHubhttps://github.com/smugglys/translatomatic)で歓迎します。 このプロジェクトは、共同作業のための安全で歓迎すべき空間であり、寄稿者は [貢献者規約](http://contributor-covenant.org) 行動規範。
159
164
 
160
165
  * * *
161
166
 
162
- ## ライセンス
167
+ ##ライセンス
163
168
 
164
- の逸品をご用意してオープンソースの条件の下での [MITライセンス](https://opensource.org/licenses/MIT)ます。
169
+ この宝石は、オープンソースとしての [MITライセンス](https://opensource.org/licenses/MIT)
165
170
 
166
171
  * * *
167
172
 
168
- ## 行動規範
173
+ ## 行動規範
169
174
 
170
- 皆様との交流のTranslatomaticプロジェクトのcodebases、ラッカー、チャットルームやメーリングリストで入力してください [行動規範](https://github.com/smugglys/translatomatic/blob/master/CODE_OF_CONDUCT.md)ます。
175
+ Translatomaticプロジェクトのコードベース、課題トラッカー、チャットルーム、メーリングリストと対話するすべての人は、 [行動規範](https://github.com/smugglys/translatomatic/blob/master/CODE_OF_CONDUCT.md)
171
176
 
172
- _Translatomatic 0.1.2 Sat, 06 Jan 2018 22:56:24 +1030 によって作成されました。_
177
+ _作成された Translatomatic 0.1.3 Tue, 06 Feb 2018 22:18:20 +1030 https://github.com/smugglys/translatomatic_