gettextpo 0.2.1 → 0.4.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +2 -3
- data/ext/gettextpo/gettextpo.c +15 -0
- data/lib/gettextpo/version.rb +1 -1
- data/mrblib/mrb_gettextpo_common.rb +74 -2
- metadata +9 -12
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8dc578aa39656a68a618fded31047596b0896d512e87c0a98fdc12414f0c58dd
|
|
4
|
+
data.tar.gz: 2bc242b9a93c0ff16c06ee2ad3e00822c5d95c6c8719a1a031a4a7b8eef8a214
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f0810544b3ab98f178611d2b93ba0b1bbc261ff1a61b8f6f42c90c04dc322c6740b827d78f68d31b4138bf8ca346320f8eb20bec6465830c8714b7d8e30e2ef8
|
|
7
|
+
data.tar.gz: 9134f46ca9b0dec4e96c855dfd2ddc3441721dd5597330ba8212c86c47f4590a77e8cd89e84ea800dacd499e74b32b5f56ef82a6f9443f0591e719facdd77cfb
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## CRuby and mruby version 0.4.0 - 2026-03-18
|
|
6
|
+
|
|
7
|
+
- Add `GettextPO::Message#sticky_flags`,
|
|
8
|
+
`GettextPO::Message#workflow_flags`, and `GettextPO::File#messages`
|
|
9
|
+
methods.
|
|
10
|
+
- Enable `GettextPO::File#each`, `GettextPO::MessageIterator#each`,
|
|
11
|
+
`GettextPO::FlagIterator#each`,
|
|
12
|
+
`GettextPO::Message#each_sticky_flag`, and
|
|
13
|
+
`GettextPO::Message#each_workflow_flag` to run without given block.
|
|
14
|
+
|
|
15
|
+
## CRuby and mruby version 0.3.0 - 2026-03-17
|
|
16
|
+
|
|
17
|
+
- Add `GettextPO::File#each_message`,
|
|
18
|
+
`GettextPO::Message#each_workflow_flag`, and
|
|
19
|
+
`GettextPO::Message#each_sticky_flag` methods.
|
|
20
|
+
|
|
5
21
|
## CRuby version 0.2.1 - 2026-03-16
|
|
6
22
|
|
|
7
23
|
- CRuby: Fix to work with gettext 0.23.
|
data/README.md
CHANGED
|
@@ -117,14 +117,13 @@ File structure:
|
|
|
117
117
|
|
|
118
118
|
## Contributing
|
|
119
119
|
|
|
120
|
-
Bug reports and pull requests are welcome on [
|
|
120
|
+
Bug reports and pull requests are welcome on [GitHub][github].
|
|
121
121
|
|
|
122
122
|
Other links:
|
|
123
123
|
|
|
124
124
|
* [RubyGems](https://rubygems.org/gems/gettextpo)
|
|
125
|
-
* [GitHub repository](https://github.com/gemmaro/ruby-gettextpo)
|
|
126
125
|
|
|
127
|
-
[
|
|
126
|
+
[github]: https://github.com/ruby-gettext/gettextpo
|
|
128
127
|
|
|
129
128
|
## License
|
|
130
129
|
|
data/ext/gettextpo/gettextpo.c
CHANGED
|
@@ -487,6 +487,11 @@ UPDATE_FLAG (workflow);
|
|
|
487
487
|
|
|
488
488
|
/**
|
|
489
489
|
* Document-method: workflow_flag_iterator
|
|
490
|
+
* call-seq: workflow_flag_iterator -> GettextPO::FlagIterator
|
|
491
|
+
*
|
|
492
|
+
* You may find it handy to use the #each_workflow_flag method to
|
|
493
|
+
* iterate over the sticky flag. This is for more versatile
|
|
494
|
+
* manipulation.
|
|
490
495
|
*/
|
|
491
496
|
FLAG_ITER (workflow);
|
|
492
497
|
|
|
@@ -565,6 +570,11 @@ UPDATE_FLAG (sticky);
|
|
|
565
570
|
|
|
566
571
|
/**
|
|
567
572
|
* Document-method: sticky_flag_iterator
|
|
573
|
+
* call-seq: sticky_flag_iterator -> GettextPO::FlagIterator
|
|
574
|
+
*
|
|
575
|
+
* You may find it handy to use the #each_sticky_flag method to
|
|
576
|
+
* iterate over the sticky flag. This is for more versatile
|
|
577
|
+
* manipulation.
|
|
568
578
|
*/
|
|
569
579
|
FLAG_ITER (sticky);
|
|
570
580
|
#endif
|
|
@@ -803,6 +813,11 @@ gettextpo_po_file_m_domains (VALUE self)
|
|
|
803
813
|
|
|
804
814
|
/**
|
|
805
815
|
* call-seq: message_iterator (domain = nil) -> GettextPO::MessageIterator
|
|
816
|
+
*
|
|
817
|
+
* You may find it handy to use the #each_message method instead of
|
|
818
|
+
* this to iterate over the messages. This method is for more
|
|
819
|
+
* versatile manipulation; the returned iterator can insert messages,
|
|
820
|
+
* for example.
|
|
806
821
|
*/
|
|
807
822
|
VALUE
|
|
808
823
|
gettextpo_po_file_m_message_iterator (int argc, VALUE *argv, VALUE self)
|
data/lib/gettextpo/version.rb
CHANGED
|
@@ -45,7 +45,12 @@ module GettextPO
|
|
|
45
45
|
"please use other methods instead, such as GettextPO::File#message_iterator"
|
|
46
46
|
end
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
# call-seq:
|
|
49
|
+
# each { |message| ... }
|
|
50
|
+
# each -> Enumerator
|
|
51
|
+
def each
|
|
52
|
+
block_given? or return enum_for
|
|
53
|
+
|
|
49
54
|
while true
|
|
50
55
|
begin
|
|
51
56
|
yield self.next
|
|
@@ -76,6 +81,68 @@ module GettextPO
|
|
|
76
81
|
end
|
|
77
82
|
positions
|
|
78
83
|
end
|
|
84
|
+
|
|
85
|
+
# call-seq:
|
|
86
|
+
# each_sticky_flag { |flag| ... }
|
|
87
|
+
# each_sticky_flag -> Enumerator
|
|
88
|
+
def each_sticky_flag
|
|
89
|
+
block_given? or return enum_for(__method__)
|
|
90
|
+
|
|
91
|
+
iter = sticky_flag_iterator
|
|
92
|
+
while true
|
|
93
|
+
begin
|
|
94
|
+
yield iter.next
|
|
95
|
+
rescue StopIteration
|
|
96
|
+
return
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
def sticky_flags
|
|
102
|
+
each_sticky_flag.to_a
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# call-seq:
|
|
106
|
+
# each_workflow_flag { |flag| ... }
|
|
107
|
+
# each_workflow_flag -> Enumerator
|
|
108
|
+
def each_workflow_flag
|
|
109
|
+
block_given? or return enum_for(__method__)
|
|
110
|
+
|
|
111
|
+
iter = workflow_flag_iterator
|
|
112
|
+
while true
|
|
113
|
+
begin
|
|
114
|
+
yield iter.next
|
|
115
|
+
rescue StopIteration
|
|
116
|
+
return
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
def workflow_flags
|
|
122
|
+
each_workflow_flag.to_a
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
class File
|
|
127
|
+
# call-seq:
|
|
128
|
+
# each_message (domain = nil) { |message| ... }
|
|
129
|
+
# each_message (domain = nil) -> Enumerator
|
|
130
|
+
def each_message(domain = nil)
|
|
131
|
+
block_given? or return enum_for(__method__)
|
|
132
|
+
|
|
133
|
+
iter = message_iterator(domain)
|
|
134
|
+
while true
|
|
135
|
+
begin
|
|
136
|
+
yield iter.next
|
|
137
|
+
rescue StopIteration
|
|
138
|
+
return
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
def messages(domain = nil)
|
|
144
|
+
each_message(domain).to_a
|
|
145
|
+
end
|
|
79
146
|
end
|
|
80
147
|
|
|
81
148
|
# This class doesn't provide the +new+ class method. See also
|
|
@@ -96,7 +163,12 @@ module GettextPO
|
|
|
96
163
|
"please use other methods instead, such as GettextPO::Message#workflow_flag_iterator"
|
|
97
164
|
end
|
|
98
165
|
|
|
99
|
-
|
|
166
|
+
# call-seq:
|
|
167
|
+
# each { |flag| ... }
|
|
168
|
+
# each -> Enumerator
|
|
169
|
+
def each
|
|
170
|
+
block_given? or return enum_for
|
|
171
|
+
|
|
100
172
|
while true
|
|
101
173
|
begin
|
|
102
174
|
yield self.next
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gettextpo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- gemmaro
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies: []
|
|
13
12
|
description: This gem is a Ruby library for the GNU gettext PO files. This is a C
|
|
14
13
|
binding of the libgettextpo library, which is part of the GNU gettext package.
|
|
@@ -30,18 +29,17 @@ files:
|
|
|
30
29
|
- lib/gettextpo.rb
|
|
31
30
|
- lib/gettextpo/version.rb
|
|
32
31
|
- mrblib/mrb_gettextpo_common.rb
|
|
33
|
-
homepage: https://
|
|
32
|
+
homepage: https://github.com/ruby-gettext/gettextpo
|
|
34
33
|
licenses:
|
|
35
34
|
- GPL-3.0-or-later
|
|
36
35
|
metadata:
|
|
37
36
|
rubygems_mfa_required: 'true'
|
|
38
|
-
bug_tracker_uri: https://
|
|
39
|
-
changelog_uri: https://
|
|
37
|
+
bug_tracker_uri: https://github.com/ruby-gettext/gettextpo/issues
|
|
38
|
+
changelog_uri: https://github.com/ruby-gettext/gettextpo/src/branch/main/CHANGELOG.md
|
|
40
39
|
documentation_uri: https://gemmaro.github.io/ruby-gettextpo/
|
|
41
|
-
homepage_uri: https://
|
|
42
|
-
source_code_uri: https://
|
|
43
|
-
wiki_uri: https://
|
|
44
|
-
post_install_message:
|
|
40
|
+
homepage_uri: https://github.com/ruby-gettext/gettextpo
|
|
41
|
+
source_code_uri: https://github.com/ruby-gettext/gettextpo
|
|
42
|
+
wiki_uri: https://github.com/ruby-gettext/gettextpo/wiki
|
|
45
43
|
rdoc_options: []
|
|
46
44
|
require_paths:
|
|
47
45
|
- lib
|
|
@@ -57,8 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
57
55
|
version: '0'
|
|
58
56
|
requirements:
|
|
59
57
|
- libgettextpo
|
|
60
|
-
rubygems_version:
|
|
61
|
-
signing_key:
|
|
58
|
+
rubygems_version: 4.0.6
|
|
62
59
|
specification_version: 4
|
|
63
60
|
summary: GNU gettext PO file parser library
|
|
64
61
|
test_files: []
|