translatomatic 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +5 -5
  2. data/.gitattributes +1 -0
  3. data/.gitignore +15 -12
  4. data/.rspec +3 -3
  5. data/.travis.yml +32 -50
  6. data/CODE_OF_CONDUCT.md +74 -74
  7. data/Gemfile +29 -5
  8. data/Guardfile +48 -0
  9. data/LICENSE.txt +21 -21
  10. data/README.de.md +92 -0
  11. data/README.es.md +92 -0
  12. data/README.fr.md +92 -0
  13. data/README.it.md +92 -0
  14. data/README.ja.md +92 -0
  15. data/README.md +96 -74
  16. data/Rakefile +6 -6
  17. data/bin/setup +8 -8
  18. data/bin/translatomatic +6 -6
  19. data/bin/travis +26 -0
  20. data/db/database.yml +9 -9
  21. data/db/migrate/201712170000_initial.rb +24 -23
  22. data/lib/translatomatic/cli.rb +204 -80
  23. data/lib/translatomatic/config.rb +12 -26
  24. data/lib/translatomatic/converter.rb +206 -142
  25. data/lib/translatomatic/converter_stats.rb +27 -27
  26. data/lib/translatomatic/database.rb +139 -99
  27. data/lib/translatomatic/escaped_unicode.rb +90 -90
  28. data/lib/translatomatic/extractor/base.rb +14 -0
  29. data/lib/translatomatic/extractor/ruby.rb +5 -0
  30. data/lib/translatomatic/extractor.rb +4 -0
  31. data/lib/translatomatic/http_request.rb +133 -0
  32. data/lib/translatomatic/locale.rb +52 -0
  33. data/lib/translatomatic/logger.rb +28 -0
  34. data/lib/translatomatic/model/locale.rb +21 -22
  35. data/lib/translatomatic/model/text.rb +17 -13
  36. data/lib/translatomatic/model.rb +4 -4
  37. data/lib/translatomatic/option.rb +24 -24
  38. data/lib/translatomatic/progress_updater.rb +15 -0
  39. data/lib/translatomatic/resource_file/base.rb +169 -137
  40. data/lib/translatomatic/resource_file/html.rb +46 -28
  41. data/lib/translatomatic/resource_file/markdown.rb +54 -0
  42. data/lib/translatomatic/resource_file/plist.rb +30 -29
  43. data/lib/translatomatic/resource_file/properties.rb +72 -60
  44. data/lib/translatomatic/resource_file/resw.rb +30 -0
  45. data/lib/translatomatic/resource_file/text.rb +29 -28
  46. data/lib/translatomatic/resource_file/xcode_strings.rb +71 -65
  47. data/lib/translatomatic/resource_file/xml.rb +79 -59
  48. data/lib/translatomatic/resource_file/yaml.rb +82 -80
  49. data/lib/translatomatic/resource_file.rb +76 -74
  50. data/lib/translatomatic/string.rb +160 -0
  51. data/lib/translatomatic/tmx/document.rb +100 -0
  52. data/lib/translatomatic/tmx/translation_unit.rb +19 -0
  53. data/lib/translatomatic/tmx.rb +4 -0
  54. data/lib/translatomatic/translation_result.rb +75 -57
  55. data/lib/translatomatic/translator/base.rb +83 -47
  56. data/lib/translatomatic/translator/frengly.rb +57 -64
  57. data/lib/translatomatic/translator/google.rb +31 -30
  58. data/lib/translatomatic/translator/microsoft.rb +33 -32
  59. data/lib/translatomatic/translator/my_memory.rb +64 -55
  60. data/lib/translatomatic/translator/yandex.rb +39 -37
  61. data/lib/translatomatic/translator.rb +63 -63
  62. data/lib/translatomatic/util.rb +15 -24
  63. data/lib/translatomatic/version.rb +4 -3
  64. data/lib/translatomatic.rb +32 -27
  65. data/translatomatic.gemspec +43 -45
  66. metadata +52 -18
  67. data/Gemfile.lock +0 -137
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 146d42de6429eea2a7b3598be2e6a0fca7b1ad698d990068e4f432152979c021
4
- data.tar.gz: f87d1f735a5d9d9a868e6112653ec7c9e393abe060880bf86e8adf389e3f761a
2
+ SHA1:
3
+ metadata.gz: f129b6a64a7fc293ad0a7c367c03c478dd6ff92c
4
+ data.tar.gz: 4748f4e995979790172965f4376b21e872f7eaef
5
5
  SHA512:
6
- metadata.gz: 6b1ac516743bd739b785b937e4c969112029a3cf90e14343b42ce42613c29955c6442b847e80c9d7cd134a20b60e722f1b0261ec2c38b8a546c2223332242060
7
- data.tar.gz: 99f948dcd088f261ba4ab1b96d8b788759999f2620e791d58761250a8575b3902e7aebfc374569f39a964438a4a58f1cfbeff62b9bfeb680acac18407ef0cba7
6
+ metadata.gz: db0186df47f6a804226b6b04bd04b3caccdd6654c7d4c84cda0268087c513d26fc3ec3ac150623c7660d1bf7e5a608a7bcbab710c00568e17dbb5693c6aa4e3c
7
+ data.tar.gz: b48991963f4fdfd6076de821eddb093ad33f09c3a79bc68ffd305545e8d8b0131100c5a1b17a352ed0526f63a92d4aed428d16808cb4ee02d63fa663242d518c
data/.gitattributes ADDED
@@ -0,0 +1 @@
1
+ * text=auto
data/.gitignore CHANGED
@@ -1,12 +1,15 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /spec/tmp/
9
- /tmp/
10
-
11
- # rspec failure tracking
12
- .rspec_status
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/tmp/
9
+ /tmp/
10
+ /bin/test
11
+
12
+ /Gemfile.lock
13
+
14
+ # rspec failure tracking
15
+ .rspec_status
data/.rspec CHANGED
@@ -1,3 +1,3 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml CHANGED
@@ -1,51 +1,33 @@
1
- # Enables Travis to use their new container-based infrastructure
2
- sudo: false
3
-
4
- # Build for Ruby
5
- language: ruby
6
-
7
- # Enables caching for bundler
8
- cache: bundler
9
-
10
- # Passes arguments to bundle install (http://gembundler.com/man/bundle-install.1.html)
11
- # bundler_args:
12
-
13
- # Specify which ruby versions you wish to run your tests on, each version will be used
14
- rvm:
15
- - 1.9
16
- - 2.2
17
- - 2.3
1
+ # Build for Ruby
2
+ language: ruby
3
+ cache:
4
+ bundler: true
5
+ directories:
6
+ - tmp/cache/codeclimate
7
+
8
+ os:
9
+ - linux
10
+ - osx
11
+
12
+ # Specify which ruby versions you wish to run your tests on, each version will be used
13
+ rvm:
14
+ - 2.2
15
+ - 2.3
18
16
  - 2.4
19
- - ruby-head
20
- - jruby
21
-
22
- # Define how to run your tests (defaults to `bundle exec rake` or `rake` depending on whether you have a `Gemfile`)
23
- script: "bundle exec rake"
24
-
25
- # Define tasks to be completed before and after tests run . Will allow folding of content on frontend
26
- #before_script:
27
- # - command_1
28
- # - command_2
29
- #
30
- #after_script:
31
- # - command_1
32
- # - command_2
33
-
34
- # Specify an ENV variable to run before: 'bundle install' and 'rake' (or your defined 'script')
35
- env:
36
- - CI=1
37
-
38
- # Specify the recipients for email notification
39
- #notifications:
40
- # recipients:
41
- # - email-address-1
42
- # - email-address-2
43
-
44
- # Disable email notifications
45
- #notifications:
46
- # disabled: true
47
-
48
- # notifications:
49
- # webhooks:
50
- # urls:
51
- # - https://webhooks.gitter.im/e/c6dbb9323007dfcf81df
17
+ # - jruby # Unknown ruby string (do not know how to handle): jruby-9.1.15.0200
18
+ # - ruby-head # cannot load such file -- bundler/dep_proxy (?)
19
+ # - 1.9 # incompatible with activesupport 5
20
+
21
+ env:
22
+ global:
23
+ - CC_TEST_REPORTER_ID=3c907b2e0a343abfe219925db045ff59f2088392a11cd324554dc11a4d8ca025
24
+ - CI=1
25
+
26
+ before_script:
27
+ - bin/travis before
28
+
29
+ # Define how to run your tests (defaults to `bundle exec rake` or `rake` depending on whether you have a `Gemfile`)
30
+ script: "bundle exec rspec"
31
+
32
+ after_script:
33
+ - bin/travis after
data/CODE_OF_CONDUCT.md CHANGED
@@ -1,74 +1,74 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at contact@smugglys.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at contact@smugglys.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile CHANGED
@@ -1,6 +1,30 @@
1
- source "https://rubygems.org"
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) { |repo| "https://github.com/smugglys/translatomatic" }
4
+
5
+ def gem_installed?(args)
6
+ name, *version = *args
7
+ dependency = Gem::Dependency.new(name, *version)
8
+ specs = dependency.matching_specs
9
+ specs && !specs.empty?
10
+ end
11
+
12
+ def optional_gem(*args)
13
+ gem *args if gem_installed?(args)
14
+ end
15
+
16
+ optional_gem 'sqlite3', '~> 1.3'
17
+ optional_gem 'mysql2'
18
+ optional_gem 'postgresql'
2
19
 
3
- git_source(:github) {|repo_name| "https://github.com/smugglys/translatomatic" }
4
-
5
- # Specify your gem's dependencies in translatomatic.gemspec
6
- gemspec
20
+ # bigdecimal required by crack-0.4.3 on cygwin
21
+ optional_gem 'bigdecimal'
22
+
23
+ # jruby
24
+ optional_gem 'activerecord-jdbc-adapter', platform: :jruby
25
+ optional_gem 'activerecord-jdbcsqlite3-adapter', platform: :jruby
26
+ optional_gem 'activerecord-jdbcmysql-adapter', platform: :jruby
27
+ optional_gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
28
+
29
+ # Specify your gem's dependencies in translatomatic.gemspec
30
+ gemspec
data/Guardfile ADDED
@@ -0,0 +1,48 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ ## Uncomment and set this to only include directories you want to watch
5
+ # directories %w(app lib config test spec features) \
6
+ # .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
7
+
8
+ ## Note: if you are using the `directories` clause above and you are not
9
+ ## watching the project directory ('.'), then you will want to move
10
+ ## the Guardfile to a watched dir and symlink it back, e.g.
11
+ #
12
+ # $ mkdir config
13
+ # $ mv Guardfile config/
14
+ # $ ln -s config/Guardfile .
15
+ #
16
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
17
+
18
+ # Note: The cmd option is now required due to the increasing number of ways
19
+ # rspec may be run, below are examples of the most common uses.
20
+ # * bundler: 'bundle exec rspec'
21
+ # * bundler binstubs: 'bin/rspec'
22
+ # * spring: 'bin/rspec' (This will use spring if running and you have
23
+ # installed the spring binstubs per the docs)
24
+ # * zeus: 'zeus rspec' (requires the server to be started separately)
25
+ # * 'just' rspec: 'rspec'
26
+
27
+ #guard 'spork' do
28
+ # watch('Gemfile.lock')
29
+ # watch('spec/spec_helper.rb') { :rspec }
30
+ #end
31
+
32
+ guard :rspec, cmd: "bundle exec rspec" do
33
+ require "guard/rspec/dsl"
34
+ dsl = Guard::RSpec::Dsl.new(self)
35
+
36
+ # Feel free to open issues for suggestions and improvements
37
+
38
+ # RSpec files
39
+ rspec = dsl.rspec
40
+ watch(rspec.spec_helper) { rspec.spec_dir }
41
+ watch(rspec.spec_support) { rspec.spec_dir }
42
+ watch(rspec.spec_files)
43
+
44
+ # Ruby files
45
+ ruby = dsl.ruby
46
+ dsl.watch_spec_files_for(ruby.lib_files)
47
+
48
+ end
data/LICENSE.txt CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2017 Smuggly Systems Intergalactic
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Smuggly Systems Intergalactic
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.de.md ADDED
@@ -0,0 +1,92 @@
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
+
3
+ # Translatomatic
4
+
5
+ Übersetzt text-Dateien von einer Sprache zur anderen. Die folgenden Datei-Formatewerden derzeit unterstützt::
6
+
7
+ - [Eigenschaften](https://en.wikipedia.org/wiki/.properties)
8
+ - RESW (Windows-Ressourcen-Datei)
9
+ - [Eigenschaftslisten](https://en.wikipedia.org/wiki/Property_list) (OSX plist)
10
+ - HTML
11
+ - XML
12
+ - [XCode strings](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/LoadingResources/Strings/Strings.html)
13
+ - [YAML](http://yaml.org/)
14
+ - Textdateien
15
+
16
+ Übersetzten Zeichenfolgen werden in einer Datenbank gespeichert und wiederverwendet werden.
17
+
18
+ ## Installation
19
+
20
+ Fügen Sie diese Zeile in Ihre Anwendung `Gemfile`:
21
+
22
+ `ruby
23
+ gem 'translatomatic'
24
+ `
25
+
26
+ Und dann ausführen:
27
+
28
+ $ bundle
29
+
30
+ Oder Sie installieren es selbst als:
31
+
32
+ $ gem install translatomatic
33
+
34
+ ## Nutzung
35
+
36
+ Die command-line-interface für die übersetzung-Funktionalität `translatomatic`. Für Hilfe zu verfügbaren Optionen ausführen:
37
+
38
+ $ translatomatic help
39
+
40
+ ### Übersetzen von Dateien
41
+
42
+ `translatomatic` übersetzt den text, ein Satz oder auf Zeit. Wenn eine Datei neu übersetzt, nur Sätze, die geändert wurden, werden an den übersetzer gesendet, und der rest stammen aus der lokalen Datenbank.
43
+
44
+ Um eine Liste der verfügbaren übersetzungs-services und-Optionen:
45
+
46
+ $ translatomatic translators
47
+
48
+ Die übersetzung eines Java-properties-Datei, Deutsch und Französisch:
49
+
50
+ $ translatomatic translate resources/strings.properties de fr
51
+
52
+ Dies würde zu erstellen (oder überschreiben) `strings_de.properties` und `strings_fr.properties`.
53
+
54
+ ### Extrahieren von Zeichenfolgen aus den Quelldateien
55
+
56
+ Zum extrahieren von Zeichenfolgen aus einige source-Dateien, benutzen Sie den extract-Befehl, z.B.
57
+
58
+ $ translatomatic strings file.rb
59
+
60
+ ### Die Anzeige von Zeichenfolgen aus einem resource-bundle
61
+
62
+ Auslesen und anzeigen `store.description` und `store.name` Eigenschaften von der lokalen Ressource-Dateien in Englisch, Deutsch und Französisch:
63
+
64
+ $ translatomatic display --locales=en,de,fr \
65
+ resources/strings.properties store.description store.name
66
+
67
+ ## Konfiguration
68
+
69
+ Standardmäßig `translatomatic` nutzt eine sqlite3 Datenbank, in `$HOME/.translatomatic/translatomatic.sqlite3` zum speichern der übersetzten strings. Die Datenbank kann geändert werden, durch die Schaffung einer `database.yml` Datei unter `$HOME/.translatomatic/database.yml` für die `production` Umwelt, z.B.
70
+
71
+ production:
72
+ adapter: mysql2
73
+ host: db.example.com
74
+ database: translatomatic
75
+ pool: 5
76
+ encoding: utf8
77
+ username: username
78
+ password: password
79
+
80
+ ## Beitrag
81
+
82
+ Bug-reports und pull-requests sind willkommen auf GitHub an https://github.com/smugglys/translatomatic. Dieses Projekt soll zu einem sicheren, einladenden Raum für die Zusammenarbeit und Mitwirkende werden erwartet, um die Einhaltung der [Beitrag Bund](http://contributor-covenant.org) code of conduct.
83
+
84
+ ## Lizenz
85
+
86
+ Der Edelstein ist als open source unter den Bedingungen der [MIT-Lizenz](https://opensource.org/licenses/MIT).
87
+
88
+ ## Verhaltenskodex
89
+
90
+ Jeder der Interaktion mit dem Translatomatic Projekt codebase, issue-Tracker, chat-rooms und mailing-Listen sollen Folgen [Verhaltenskodex](https://github.com/smugglys/translatomatic/blob/master/CODE_OF_CONDUCT.md).
91
+
92
+ _Created by Translatomatic 0.1.0 2017-12-28 22:28_
data/README.es.md ADDED
@@ -0,0 +1,92 @@
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
+
3
+ # Translatomatic
4
+
5
+ Traduce los archivos de texto de un idioma a otro. Los siguientes formatos de archivoestán soportadas actualmente::
6
+
7
+ - [Propiedades](https://en.wikipedia.org/wiki/.properties)
8
+ - RESW (Windows archivo de recursos)
9
+ - [Las listas de propiedades](https://en.wikipedia.org/wiki/Property_list) (OSX plist)
10
+ - HTML
11
+ - XML
12
+ - [XCode cadenas](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/LoadingResources/Strings/Strings.html)
13
+ - [YAML](http://yaml.org/)
14
+ - Los archivos de texto
15
+
16
+ Traducido cadenas se guardan en una base de datos y volver a utilizar.
17
+
18
+ ## Instalación
19
+
20
+ Añadir esta línea a su aplicación `Gemfile`:
21
+
22
+ `ruby
23
+ gem 'translatomatic'
24
+ `
25
+
26
+ Y, a continuación, ejecute:
27
+
28
+ $ bundle
29
+
30
+ O instalar usted mismo como:
31
+
32
+ $ gem install translatomatic
33
+
34
+ ## El uso de
35
+
36
+ La interfaz de línea de comandos para la traducción funcionalidad es `translatomatic`. Para obtener ayuda sobre las opciones disponibles, ejecute:
37
+
38
+ $ translatomatic help
39
+
40
+ ### La traducción de los archivos de
41
+
42
+ `translatomatic` traduce el texto una oración o una frase en un momento. Si el archivo se vuelve a traducir, solo frases que han cambiado son enviados para el traductor, y el resto se obtienen de la base de datos local.
43
+
44
+ A la lista de servicios de traducción y de opciones:
45
+
46
+ $ translatomatic translators
47
+
48
+ Para traducir un archivo de propiedades Java para el alemán y el francés:
49
+
50
+ $ translatomatic translate resources/strings.properties de fr
51
+
52
+ Esto podría crear (o sobrescribir) `strings_de.properties` y `strings_fr.properties`.
53
+
54
+ ### La extracción de las cadenas de los archivos de origen
55
+
56
+ Para extraer las cadenas de algunos archivos de origen, utilice el comando extraer, por ejemplo,
57
+
58
+ $ translatomatic strings file.rb
59
+
60
+ ### La visualización de las cuerdas de un paquete de recursos
61
+
62
+ Para leer y mostrar el `store.description` y `store.name` propiedades de los archivos de recursos locales en inglés, alemán y francés:
63
+
64
+ $ translatomatic display --locales=en,de,fr \
65
+ resources/strings.properties store.description store.name
66
+
67
+ ## Configuración
68
+
69
+ De forma predeterminada, `translatomatic` utiliza una base de datos sqlite3 en `$HOME/.translatomatic/translatomatic.sqlite3` para almacenar cadenas traducidas. La base de datos puede ser cambiado mediante la creación de un `database.yml` archivo bajo `$HOME/.translatomatic/database.yml` para el `production` medio ambiente, por ejemplo,
70
+
71
+ production:
72
+ adapter: mysql2
73
+ host: db.example.com
74
+ database: translatomatic
75
+ pool: 5
76
+ encoding: utf8
77
+ username: username
78
+ password: password
79
+
80
+ ## Contribuir
81
+
82
+ Los informes de error y tire de las solicitudes son bienvenidas en GitHub en https://github.com/smugglys/translatomatic. Este proyecto está destinado a ser un lugar seguro, acogedor espacio para la colaboración, y los participantes se adhieran a la [Colaborador Pacto](http://contributor-covenant.org) el código de conducta.
83
+
84
+ ## Licencia
85
+
86
+ La joya está disponible como código abierto bajo los términos de la [Licencia MIT](https://opensource.org/licenses/MIT).
87
+
88
+ ## Código de Conducta
89
+
90
+ Todo el mundo que interactúan con el Translatomatic del proyecto códigos base, incidencias, salas de chat y listas de correo, se espera que siga el [código de conducta](https://github.com/smugglys/translatomatic/blob/master/CODE_OF_CONDUCT.md).
91
+
92
+ _Created by Translatomatic 0.1.0 2017-12-29 00:30_