gettextpo 0.2.1 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b3af64548353c078af5052c1b203ab5d7ae1ae359b2f47728f10de68127098b
4
- data.tar.gz: d62fa55845eaf75754b13e05d06e1006933ee1b20444a6de1d8a7fe765d6a876
3
+ metadata.gz: 883b42b17eceae60f5baea02d4048198953cf8aa69266998e56543022b00124c
4
+ data.tar.gz: 13767623c26247eb1e9903e2275c3b44b55c9bd91b5e2914fbd6038dcfcfada3
5
5
  SHA512:
6
- metadata.gz: 876211285e1120372703d8379b1dbeeed7cf0c636688e0e5eef785611bfe890b8d3a1aea6d89e3785b2c8c6e06f94b61b0dc4e4ab04ecbf3a2d00ae68bf98f5b
7
- data.tar.gz: ef90df9cf0e3aed603936bf1c902339cb48a97b43d6738d22e7ef57dfd0c667e00abbaf63cb62616ba23e5de65400384d188901a9975bdb49733f8abacdb0b0e
6
+ metadata.gz: dcdf35d913cc25c17183148b8ec755ec900f71f6ebfdbd5b4e1b7d2872d875bdc45e29604c26406554ece67f2c8eda061d15d52b0abc84c968745a02ab38c01b
7
+ data.tar.gz: 062c043c1e964a43742805843b7b3f39bdbdd6193696e69c5d9cbadf5578c7b940b64e2809617417a69b46428378501f4c924167e3123662f6b9e4b47b76bf9e
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## CRuby and mruby version 0.3.0 - 2026-03-17
6
+
7
+ - Add `GettextPO::File#each_message`,
8
+ `GettextPO::Message#each_workflow_flag`, and
9
+ `GettextPO::Message#each_sticky_flag` methods.
10
+
5
11
  ## CRuby version 0.2.1 - 2026-03-16
6
12
 
7
13
  - CRuby: Fix to work with gettext 0.23.
@@ -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 #workflow_flag_iterator 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 #sticky_flag_iterator 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)
@@ -19,5 +19,5 @@
19
19
 
20
20
  module GettextPO
21
21
  # Version of this gem.
22
- VERSION = "0.2.1"
22
+ VERSION = "0.3.0"
23
23
  end
@@ -76,6 +76,41 @@ module GettextPO
76
76
  end
77
77
  positions
78
78
  end
79
+
80
+ def each_sticky_flag # yields: flag
81
+ iter = sticky_flag_iterator
82
+ while true
83
+ begin
84
+ yield iter.next
85
+ rescue StopIteration
86
+ return
87
+ end
88
+ end
89
+ end
90
+
91
+ def each_workflow_flag # yields: flag
92
+ iter = workflow_flag_iterator
93
+ while true
94
+ begin
95
+ yield iter.next
96
+ rescue StopIteration
97
+ return
98
+ end
99
+ end
100
+ end
101
+ end
102
+
103
+ class File
104
+ def each_message(domain = nil) # yields: message
105
+ iter = message_iterator(domain)
106
+ while true
107
+ begin
108
+ yield iter.next
109
+ rescue StopIteration
110
+ return
111
+ end
112
+ end
113
+ end
79
114
  end
80
115
 
81
116
  # This class doesn't provide the +new+ class method. See also
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gettextpo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - gemmaro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-03-16 00:00:00.000000000 Z
11
+ date: 2026-03-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This gem is a Ruby library for the GNU gettext PO files. This is a C
14
14
  binding of the libgettextpo library, which is part of the GNU gettext package.