PoParser 3.2.3 → 3.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +41 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +76 -0
- data/Gemfile +3 -3
- data/README.md +2 -2
- data/lib/poparser/po.rb +1 -1
- data/lib/poparser/version.rb +1 -1
- data/poparser.gemspec +1 -1
- data/spec/spec_helper.rb +14 -8
- metadata +11 -15
- data/.travis.yml +0 -8
- data/Guardfile +0 -9
- data/bin/rspec +0 -29
- data/spec/utils/random_pofile_generator.rb +0 -175
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e956b0d5ba96d2c12794bd0efb3fd5a6708251c6a16b7502c4f3abbf1026e9c4
|
4
|
+
data.tar.gz: 7ef2572358ed32934a0186afa14d885f2f9bb607992e409e647a881fac98320e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60c8b351dad67ea1d6d526b74fdf978bb4be0bea06b7cec6a6daf487310b0d1385171e0e32cd3d0068db49197d2e8a651f3031fa7d808b970753bcedc55fabae
|
7
|
+
data.tar.gz: 52923e7c8d10eb5846dc51a65328b45ade04ce42268a73c9922944b7b4313988726c0f48764e9ea992b061c7607a500e98b2d1e1d0e803f47ced7780114a49d9
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Ruby
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ master ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ master ]
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
test:
|
18
|
+
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
strategy:
|
21
|
+
matrix:
|
22
|
+
ruby-version: ['2.5', '2.6', '2.7', '3.0']
|
23
|
+
|
24
|
+
steps:
|
25
|
+
- uses: actions/checkout@v2
|
26
|
+
- name: Set up Ruby
|
27
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
28
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
29
|
+
# uses: ruby/setup-ruby@v1
|
30
|
+
uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
|
31
|
+
with:
|
32
|
+
ruby-version: ${{ matrix.ruby-version }}
|
33
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
34
|
+
- name: Run tests
|
35
|
+
run: bundle exec rake
|
36
|
+
|
37
|
+
- name: Coveralls
|
38
|
+
uses: coverallsapp/github-action@master
|
39
|
+
with:
|
40
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
41
|
+
path-to-lcov: "./coverage/lcov.info"
|
data/CHANGELOG.md
CHANGED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,76 @@
|
|
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, sex characteristics, gender identity and expression,
|
9
|
+
level of experience, education, socio-economic status, nationality, personal
|
10
|
+
appearance, race, religion, or sexual identity and 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 mousavi.arash@gmail.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 https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
72
|
+
|
73
|
+
[homepage]: https://www.contributor-covenant.org
|
74
|
+
|
75
|
+
For answers to common questions about this code of conduct, see
|
76
|
+
https://www.contributor-covenant.org/faq
|
data/Gemfile
CHANGED
@@ -3,13 +3,13 @@
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
5
|
group :test do
|
6
|
-
gem '
|
7
|
-
gem '
|
6
|
+
gem 'simplecov', require: false
|
7
|
+
gem 'simplecov-lcov', require: false
|
8
|
+
gem 'rspec', '~> 3.9'
|
8
9
|
gem 'awesome_print'
|
9
10
|
end
|
10
11
|
|
11
12
|
group :development do
|
12
|
-
gem 'guard-rspec'
|
13
13
|
gem 'ruby-prof'
|
14
14
|
end
|
15
15
|
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# PoParser
|
2
2
|
|
3
|
-
|
4
|
-
[![Coverage Status](https://
|
3
|
+
![Build Status](https://github.com/arashm/poparser/workflows/Ruby/badge.svg?branch=master)
|
4
|
+
[![Coverage Status](https://coveralls.io/repos/github/arashm/PoParser/badge.svg)](https://coveralls.io/github/arashm/PoParser)
|
5
5
|
[![Code Climate](https://codeclimate.com/github/arashm/PoParser.png)](https://codeclimate.com/github/arashm/PoParser)
|
6
6
|
[![Gem Version](https://badge.fury.io/rb/PoParser.svg)](http://badge.fury.io/rb/PoParser)
|
7
7
|
|
data/lib/poparser/po.rb
CHANGED
data/lib/poparser/version.rb
CHANGED
data/poparser.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
22
|
# Runtime deps
|
23
|
-
spec.add_runtime_dependency 'simple_po_parser', '~> 1.1.
|
23
|
+
spec.add_runtime_dependency 'simple_po_parser', '~> 1.1.6'
|
24
24
|
|
25
25
|
# Development deps
|
26
26
|
spec.add_development_dependency 'bundler', '>= 0'
|
data/spec/spec_helper.rb
CHANGED
@@ -6,18 +6,24 @@
|
|
6
6
|
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
7
7
|
|
8
8
|
require 'simplecov'
|
9
|
-
require '
|
9
|
+
require 'simplecov-lcov'
|
10
10
|
require 'awesome_print'
|
11
|
-
require 'pry'
|
12
11
|
|
13
|
-
SimpleCov
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
SimpleCov::Formatter::LcovFormatter.config do |c|
|
13
|
+
c.report_with_single_file = true
|
14
|
+
c.single_report_path = 'coverage/lcov.info'
|
15
|
+
end
|
16
|
+
|
17
|
+
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(
|
18
|
+
[
|
19
|
+
SimpleCov::Formatter::HTMLFormatter,
|
20
|
+
SimpleCov::Formatter::LcovFormatter,
|
21
|
+
]
|
22
|
+
)
|
17
23
|
|
18
24
|
SimpleCov.start do
|
19
|
-
|
20
|
-
|
25
|
+
add_group "gem", "lib"
|
26
|
+
add_group "spec", "spec"
|
21
27
|
end
|
22
28
|
|
23
29
|
require 'poparser'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: PoParser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arash Mousavi
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simple_po_parser
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.1.
|
19
|
+
version: 1.1.6
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.1.
|
26
|
+
version: 1.1.6
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,22 +56,20 @@ description: A PO file parser, editor and generator. PO files are translation fi
|
|
56
56
|
generated by GNU/Gettext tool.
|
57
57
|
email:
|
58
58
|
- mousavi.arash@gmail.com
|
59
|
-
executables:
|
60
|
-
- rspec
|
59
|
+
executables: []
|
61
60
|
extensions: []
|
62
61
|
extra_rdoc_files: []
|
63
62
|
files:
|
63
|
+
- ".github/workflows/ruby.yml"
|
64
64
|
- ".gitignore"
|
65
65
|
- ".rspec"
|
66
66
|
- ".rubocop.yml"
|
67
|
-
- ".travis.yml"
|
68
67
|
- CHANGELOG.md
|
68
|
+
- CODE_OF_CONDUCT.md
|
69
69
|
- Gemfile
|
70
|
-
- Guardfile
|
71
70
|
- LICENSE.txt
|
72
71
|
- README.md
|
73
72
|
- Rakefile
|
74
|
-
- bin/rspec
|
75
73
|
- lib/poparser.rb
|
76
74
|
- lib/poparser/comment.rb
|
77
75
|
- lib/poparser/constants.rb
|
@@ -98,7 +96,6 @@ files:
|
|
98
96
|
- spec/poparser/poparser_spec.rb
|
99
97
|
- spec/poparser/tokenizer_spec.rb
|
100
98
|
- spec/spec_helper.rb
|
101
|
-
- spec/utils/random_pofile_generator.rb
|
102
99
|
- test/benchmark.po
|
103
100
|
- test/benchmark_small.po
|
104
101
|
- test/complex_entry.po
|
@@ -107,7 +104,7 @@ homepage: http://github.com/arashm/poparser
|
|
107
104
|
licenses:
|
108
105
|
- MIT
|
109
106
|
metadata: {}
|
110
|
-
post_install_message:
|
107
|
+
post_install_message:
|
111
108
|
rdoc_options: []
|
112
109
|
require_paths:
|
113
110
|
- lib
|
@@ -122,8 +119,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
119
|
- !ruby/object:Gem::Version
|
123
120
|
version: '0'
|
124
121
|
requirements: []
|
125
|
-
rubygems_version: 3.
|
126
|
-
signing_key:
|
122
|
+
rubygems_version: 3.3.7
|
123
|
+
signing_key:
|
127
124
|
specification_version: 4
|
128
125
|
summary: A PO file parser, editor and generator.
|
129
126
|
test_files:
|
@@ -143,4 +140,3 @@ test_files:
|
|
143
140
|
- spec/poparser/poparser_spec.rb
|
144
141
|
- spec/poparser/tokenizer_spec.rb
|
145
142
|
- spec/spec_helper.rb
|
146
|
-
- spec/utils/random_pofile_generator.rb
|
data/.travis.yml
DELETED
data/Guardfile
DELETED
data/bin/rspec
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
#
|
5
|
-
# This file was generated by Bundler.
|
6
|
-
#
|
7
|
-
# The application 'rspec' is installed as part of a gem, and
|
8
|
-
# this file is here to facilitate running it.
|
9
|
-
#
|
10
|
-
|
11
|
-
require "pathname"
|
12
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
-
Pathname.new(__FILE__).realpath)
|
14
|
-
|
15
|
-
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
-
|
17
|
-
if File.file?(bundle_binstub)
|
18
|
-
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
-
load(bundle_binstub)
|
20
|
-
else
|
21
|
-
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
-
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
require "rubygems"
|
27
|
-
require "bundler/setup"
|
28
|
-
|
29
|
-
load Gem.bin_path("rspec-core", "rspec")
|
@@ -1,175 +0,0 @@
|
|
1
|
-
module PoParser
|
2
|
-
module RandomPoFileGenerator
|
3
|
-
require 'securerandom'
|
4
|
-
def self.generate_file(file_path, length = 1000, obsoletes = 10)
|
5
|
-
header = "# PO benchmark file header
|
6
|
-
#
|
7
|
-
#, fuzzy
|
8
|
-
msgid \"\"
|
9
|
-
msgstr \"\"
|
10
|
-
\"Project-Id-Version: somehwat master\\n\"
|
11
|
-
\"Report-Msgid-Bugs-To: \\n\"
|
12
|
-
\"Last-Translator: last t <last.transh@e.mail>\\n\"
|
13
|
-
\"Language-Team: team\\n\"
|
14
|
-
\"Content-Type: text/plain; charset=UTF-8\\n\"
|
15
|
-
\"MIME-Version: 1.0\\n\"
|
16
|
-
\"Content-Transfer-Encoding: 8bit\\n\"
|
17
|
-
\"Plural-Forms: nplurals=1; plural=0;\\n\""
|
18
|
-
|
19
|
-
@random = Random.new
|
20
|
-
File.open(file_path, 'w+') do |file|
|
21
|
-
file.write header
|
22
|
-
file.write "\n\n"
|
23
|
-
for i in 0..length-obsoletes do
|
24
|
-
file.write generate_random_message
|
25
|
-
end
|
26
|
-
|
27
|
-
for i in 0...obsoletes do
|
28
|
-
file.write generate_random_message(true)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
33
|
-
|
34
|
-
private
|
35
|
-
|
36
|
-
def self.generate_random_message(obsolete = false)
|
37
|
-
random_message = ""
|
38
|
-
|
39
|
-
untranslated_chance = 0.05
|
40
|
-
fuzzy_chance = 0.1
|
41
|
-
plural_chance = 0.1
|
42
|
-
multiline_chance = 0.1
|
43
|
-
translator_comment_chance = 0.2
|
44
|
-
extracted_comment_chance = 0.05
|
45
|
-
msgctxt_chance = 0.9
|
46
|
-
reference_chance = 0.9
|
47
|
-
multiple_reference_chance = 0.1
|
48
|
-
|
49
|
-
plural = @random.rand < plural_chance ? true : false
|
50
|
-
untranslated = @random.rand < untranslated_chance ? true : false
|
51
|
-
fuzzy = !untranslated && @random.rand < fuzzy_chance ? true : false
|
52
|
-
multiline = @random.rand < multiline_chance ? true : false
|
53
|
-
translator_comment = @random.rand < translator_comment_chance ? true : false
|
54
|
-
extracted_comment = @random.rand < extracted_comment_chance ? true : false
|
55
|
-
reference = @random.rand < reference_chance ? true : false
|
56
|
-
multiple_reference = @random.rand < multiple_reference_chance ? true : false
|
57
|
-
with_msgctxt = @random.rand < msgctxt_chance ? true : false
|
58
|
-
|
59
|
-
msgctxt = with_msgctxt ? SecureRandom.base64((@random.rand*70.0).ceil) : nil
|
60
|
-
if multiline
|
61
|
-
lines = (@random.rand*4.0).ceil
|
62
|
-
msgid = []
|
63
|
-
msgstr = []
|
64
|
-
for i in 0..lines
|
65
|
-
msgid[i] = SecureRandom.base64((@random.rand*70.0).ceil)
|
66
|
-
msgstr[i] = SecureRandom.base64((@random.rand*70.0).ceil)
|
67
|
-
end
|
68
|
-
else
|
69
|
-
msgid = SecureRandom.base64((@random.rand*150.0).ceil)
|
70
|
-
msgstr = SecureRandom.base64((@random.rand*150.0).ceil)
|
71
|
-
end
|
72
|
-
if plural
|
73
|
-
if multiline
|
74
|
-
msgid_plural = []
|
75
|
-
msgstr_plural = []
|
76
|
-
for i in 0..lines
|
77
|
-
msgid_plural[i] = SecureRandom.base64((@random.rand*70.0).ceil)
|
78
|
-
msgstr_plural[i] = SecureRandom.base64((@random.rand*70.0).ceil)
|
79
|
-
end
|
80
|
-
else
|
81
|
-
msgid_plural = SecureRandom.base64((@random.rand*150.0).ceil)
|
82
|
-
msgstr_plural = SecureRandom.base64((@random.rand*70.0).ceil)
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
|
-
random_message += "# #{SecureRandom.base64((@random.rand*50.0).to_i)}\n" if translator_comment
|
87
|
-
random_message += "#. #{SecureRandom.base64((@random.rand*50.0).to_i)}\n" if extracted_comment
|
88
|
-
random_message += "#: #{SecureRandom.base64((@random.rand*50.0).to_i)}\n" if reference
|
89
|
-
if multiple_reference
|
90
|
-
references = (@random.rand*3.0).ceil
|
91
|
-
for i in 0..references
|
92
|
-
random_message += "#: #{SecureRandom.base64((@random.rand*50.0).to_i)}\n"
|
93
|
-
end
|
94
|
-
end
|
95
|
-
if fuzzy
|
96
|
-
random_message += "#, fuzzy\n"
|
97
|
-
random_message += "##{"~" if obsolete}| msgctxt \"#{msgctxt}\"\n" if msgctxt
|
98
|
-
if msgid.is_a?(Array)
|
99
|
-
random_message += "##{"~" if obsolete}| msgid \"\"\n"
|
100
|
-
msgid.each do |line|
|
101
|
-
random_message += "##{"~" if obsolete}| \"#{line}\\n\"\n"
|
102
|
-
end
|
103
|
-
else
|
104
|
-
random_message += "##{"~" if obsolete}| msgid \"#{msgid}\"\n"
|
105
|
-
end
|
106
|
-
if plural
|
107
|
-
if msgid_plural.is_a?(Array)
|
108
|
-
random_message += "##{"~" if obsolete}| msgid_plural \"\"\n"
|
109
|
-
msgid_plural.each do |line|
|
110
|
-
random_message += "##{"~" if obsolete}| \"#{line}\\n\"\n"
|
111
|
-
end
|
112
|
-
else
|
113
|
-
random_message += "##{"~" if obsolete}| msgid_plural \"#{msgid_plural}\"\n"
|
114
|
-
end
|
115
|
-
end
|
116
|
-
end
|
117
|
-
random_message += "#{"#~ " if obsolete}msgctxt \"#{msgctxt}\"\n" if msgctxt
|
118
|
-
if msgid.is_a?(Array)
|
119
|
-
random_message += "#{"#~ " if obsolete}msgid \"\"\n"
|
120
|
-
msgid.each do |line|
|
121
|
-
random_message += "#{"#~ " if obsolete}\"#{line}\\n\"\n"
|
122
|
-
end
|
123
|
-
else
|
124
|
-
random_message += "#{"#~ " if obsolete}msgid \"#{msgid}\"\n"
|
125
|
-
end
|
126
|
-
if plural
|
127
|
-
if msgid_plural.is_a?(Array)
|
128
|
-
random_message += "#{"#~ " if obsolete}msgid_plural \"\"\n"
|
129
|
-
msgid_plural.each do |line|
|
130
|
-
random_message += "#{"#~ " if obsolete}\"#{line}\\n\"\n"
|
131
|
-
end
|
132
|
-
else
|
133
|
-
random_message += "#{"#~ " if obsolete}msgid_plural \"#{msgid_plural}\"\n"
|
134
|
-
end
|
135
|
-
if untranslated
|
136
|
-
random_message += "#{"#~ " if obsolete}msgstr[0] \"\"\n"
|
137
|
-
random_message += "#{"#~ " if obsolete}msgstr[1] \"\"\n"
|
138
|
-
else
|
139
|
-
if msgstr.is_a?(Array)
|
140
|
-
random_message += "#{"#~ " if obsolete}msgstr[0] \"\"\n"
|
141
|
-
msgstr.each do |line|
|
142
|
-
random_message += "#{"#~ " if obsolete}\"#{line}\\n\"\n"
|
143
|
-
end
|
144
|
-
else
|
145
|
-
random_message += "#{"#~ " if obsolete}msgstr[0] \"#{msgstr}\"\n"
|
146
|
-
end
|
147
|
-
if msgstr_plural.is_a?(Array)
|
148
|
-
random_message += "#{"#~ " if obsolete}msgstr[1] \"\"\n"
|
149
|
-
msgstr_plural.each do |line|
|
150
|
-
random_message += "#{"#~ " if obsolete}\"#{line}\\n\"\n"
|
151
|
-
end
|
152
|
-
else
|
153
|
-
random_message += "#{"#~ " if obsolete}msgstr[1] \"#{msgstr}\"\n"
|
154
|
-
end
|
155
|
-
end
|
156
|
-
else
|
157
|
-
if untranslated
|
158
|
-
random_message += "#{"#~ " if obsolete}msgstr \"\"\n"
|
159
|
-
else
|
160
|
-
if msgstr.is_a?(Array)
|
161
|
-
random_message += "#{"#~ " if obsolete}msgstr \"\"\n"
|
162
|
-
msgstr.each do |line|
|
163
|
-
random_message += "#{"#~ " if obsolete}\"#{line}\\n\"\n"
|
164
|
-
end
|
165
|
-
else
|
166
|
-
random_message += "#{"#~ " if obsolete}msgstr \"#{msgstr}\"\n"
|
167
|
-
end
|
168
|
-
end
|
169
|
-
end
|
170
|
-
random_message += "\n"
|
171
|
-
random_message
|
172
|
-
end
|
173
|
-
|
174
|
-
end
|
175
|
-
end
|