translatomatic 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitattributes +1 -0
- data/.gitignore +15 -12
- data/.rspec +3 -3
- data/.travis.yml +32 -50
- data/CODE_OF_CONDUCT.md +74 -74
- data/Gemfile +29 -5
- data/Guardfile +48 -0
- data/LICENSE.txt +21 -21
- data/README.de.md +92 -0
- data/README.es.md +92 -0
- data/README.fr.md +92 -0
- data/README.it.md +92 -0
- data/README.ja.md +92 -0
- data/README.md +96 -74
- data/Rakefile +6 -6
- data/bin/setup +8 -8
- data/bin/translatomatic +6 -6
- data/bin/travis +26 -0
- data/db/database.yml +9 -9
- data/db/migrate/201712170000_initial.rb +24 -23
- data/lib/translatomatic/cli.rb +204 -80
- data/lib/translatomatic/config.rb +12 -26
- data/lib/translatomatic/converter.rb +206 -142
- data/lib/translatomatic/converter_stats.rb +27 -27
- data/lib/translatomatic/database.rb +139 -99
- data/lib/translatomatic/escaped_unicode.rb +90 -90
- data/lib/translatomatic/extractor/base.rb +14 -0
- data/lib/translatomatic/extractor/ruby.rb +5 -0
- data/lib/translatomatic/extractor.rb +4 -0
- data/lib/translatomatic/http_request.rb +133 -0
- data/lib/translatomatic/locale.rb +52 -0
- data/lib/translatomatic/logger.rb +28 -0
- data/lib/translatomatic/model/locale.rb +21 -22
- data/lib/translatomatic/model/text.rb +17 -13
- data/lib/translatomatic/model.rb +4 -4
- data/lib/translatomatic/option.rb +24 -24
- data/lib/translatomatic/progress_updater.rb +15 -0
- data/lib/translatomatic/resource_file/base.rb +169 -137
- data/lib/translatomatic/resource_file/html.rb +46 -28
- data/lib/translatomatic/resource_file/markdown.rb +54 -0
- data/lib/translatomatic/resource_file/plist.rb +30 -29
- data/lib/translatomatic/resource_file/properties.rb +72 -60
- data/lib/translatomatic/resource_file/resw.rb +30 -0
- data/lib/translatomatic/resource_file/text.rb +29 -28
- data/lib/translatomatic/resource_file/xcode_strings.rb +71 -65
- data/lib/translatomatic/resource_file/xml.rb +79 -59
- data/lib/translatomatic/resource_file/yaml.rb +82 -80
- data/lib/translatomatic/resource_file.rb +76 -74
- data/lib/translatomatic/string.rb +160 -0
- data/lib/translatomatic/tmx/document.rb +100 -0
- data/lib/translatomatic/tmx/translation_unit.rb +19 -0
- data/lib/translatomatic/tmx.rb +4 -0
- data/lib/translatomatic/translation_result.rb +75 -57
- data/lib/translatomatic/translator/base.rb +83 -47
- data/lib/translatomatic/translator/frengly.rb +57 -64
- data/lib/translatomatic/translator/google.rb +31 -30
- data/lib/translatomatic/translator/microsoft.rb +33 -32
- data/lib/translatomatic/translator/my_memory.rb +64 -55
- data/lib/translatomatic/translator/yandex.rb +39 -37
- data/lib/translatomatic/translator.rb +63 -63
- data/lib/translatomatic/util.rb +15 -24
- data/lib/translatomatic/version.rb +4 -3
- data/lib/translatomatic.rb +32 -27
- data/translatomatic.gemspec +43 -45
- metadata +52 -18
- data/Gemfile.lock +0 -137
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f129b6a64a7fc293ad0a7c367c03c478dd6ff92c
|
4
|
+
data.tar.gz: 4748f4e995979790172965f4376b21e872f7eaef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
12
|
-
.
|
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
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
-
|
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-
|
20
|
-
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
#
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
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
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
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_
|