gettextpo 0.2.0 → 0.2.1
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 +4 -0
- data/Gemfile +10 -0
- data/ext/gettextpo/gettextpo.c +4 -0
- data/lib/gettextpo/version.rb +1 -1
- metadata +3 -24
- data/.clang-format +0 -1
- data/.clangd +0 -2
- data/.dir-locals.el +0 -6
- data/.env.example +0 -2
- data/.envrc +0 -31
- data/.rdoc_options +0 -14
- data/build_config.rb +0 -27
- data/include/mrb_gettextpo.h +0 -24
- data/manifest.scm +0 -43
- data/mrbgem.rake +0 -24
- data/mrblib/mrb_gettextpo.rb +0 -58
- data/mrblib/mrb_gettextpo_version.rb +0 -23
- data/sig/gettextpo.rbs +0 -4
- data/src/mrb_gettextpo.c +0 -942
- data/test.cruby/gettextpo_test.rb +0 -53
- data/test.cruby/resources/a.po +0 -1
- data/test.cruby/resources/bad.po +0 -20
- data/test.cruby/resources/filepos.po +0 -3
- data/test.cruby/resources/format.po +0 -3
- data/test.cruby/resources/ok.po +0 -16
- data/test.cruby/test_helper.rb +0 -21
- data/test.cruby/tmp/.keep +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9b3af64548353c078af5052c1b203ab5d7ae1ae359b2f47728f10de68127098b
|
|
4
|
+
data.tar.gz: d62fa55845eaf75754b13e05d06e1006933ee1b20444a6de1d8a7fe765d6a876
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 876211285e1120372703d8379b1dbeeed7cf0c636688e0e5eef785611bfe890b8d3a1aea6d89e3785b2c8c6e06f94b61b0dc4e4ab04ecbf3a2d00ae68bf98f5b
|
|
7
|
+
data.tar.gz: ef90df9cf0e3aed603936bf1c902339cb48a97b43d6738d22e7ef57dfd0c667e00abbaf63cb62616ba23e5de65400384d188901a9975bdb49733f8abacdb0b0e
|
data/CHANGELOG.md
CHANGED
data/Gemfile
ADDED
data/ext/gettextpo/gettextpo.c
CHANGED
|
@@ -170,6 +170,7 @@ static const struct po_xerror_handler gettextpo_xerror_handler = {
|
|
|
170
170
|
.xerror2 = gettextpo_xerror2,
|
|
171
171
|
};
|
|
172
172
|
|
|
173
|
+
#ifdef HAVE_PO_MESSAGE_GET_FORMAT
|
|
173
174
|
/**
|
|
174
175
|
* Document-class: GettextPO::FlagIterator
|
|
175
176
|
*/
|
|
@@ -204,6 +205,7 @@ gettextpo_po_flag_iterator_m_next (VALUE self)
|
|
|
204
205
|
else
|
|
205
206
|
rb_raise (rb_eStopIteration, "no more flag");
|
|
206
207
|
}
|
|
208
|
+
#endif
|
|
207
209
|
|
|
208
210
|
/**
|
|
209
211
|
* Document-class: GettextPO::Message
|
|
@@ -1144,9 +1146,11 @@ Init_gettextpo (void)
|
|
|
1144
1146
|
rb_define_method (rb_cFilePos, "file", gettextpo_po_filepos_m_file, 0);
|
|
1145
1147
|
rb_define_method (rb_cFilePos, "start_line",
|
|
1146
1148
|
gettextpo_po_filepos_m_start_line, 0);
|
|
1149
|
+
#ifdef HAVE_PO_MESSAGE_GET_FORMAT
|
|
1147
1150
|
rb_cFlagIterator
|
|
1148
1151
|
= rb_define_class_under (rb_mGettextPO, "FlagIterator", rb_cObject);
|
|
1149
1152
|
rb_define_alloc_func (rb_cFlagIterator, gettextpo_po_flag_iterator_alloc);
|
|
1150
1153
|
rb_define_method (rb_cFlagIterator, "next",
|
|
1151
1154
|
gettextpo_po_flag_iterator_m_next, 0);
|
|
1155
|
+
#endif
|
|
1152
1156
|
}
|
data/lib/gettextpo/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.2.1
|
|
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-
|
|
11
|
+
date: 2026-03-16 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.
|
|
@@ -19,38 +19,17 @@ extensions:
|
|
|
19
19
|
- ext/gettextpo/extconf.rb
|
|
20
20
|
extra_rdoc_files: []
|
|
21
21
|
files:
|
|
22
|
-
- ".clang-format"
|
|
23
|
-
- ".clangd"
|
|
24
|
-
- ".dir-locals.el"
|
|
25
|
-
- ".env.example"
|
|
26
|
-
- ".envrc"
|
|
27
|
-
- ".rdoc_options"
|
|
28
22
|
- CHANGELOG.md
|
|
29
23
|
- COPYING
|
|
24
|
+
- Gemfile
|
|
30
25
|
- README.md
|
|
31
26
|
- Rakefile
|
|
32
|
-
- build_config.rb
|
|
33
27
|
- ext/gettextpo/extconf.rb
|
|
34
28
|
- ext/gettextpo/gettextpo.c
|
|
35
29
|
- ext/gettextpo/gettextpo.h
|
|
36
|
-
- include/mrb_gettextpo.h
|
|
37
30
|
- lib/gettextpo.rb
|
|
38
31
|
- lib/gettextpo/version.rb
|
|
39
|
-
- manifest.scm
|
|
40
|
-
- mrbgem.rake
|
|
41
|
-
- mrblib/mrb_gettextpo.rb
|
|
42
32
|
- mrblib/mrb_gettextpo_common.rb
|
|
43
|
-
- mrblib/mrb_gettextpo_version.rb
|
|
44
|
-
- sig/gettextpo.rbs
|
|
45
|
-
- src/mrb_gettextpo.c
|
|
46
|
-
- test.cruby/gettextpo_test.rb
|
|
47
|
-
- test.cruby/resources/a.po
|
|
48
|
-
- test.cruby/resources/bad.po
|
|
49
|
-
- test.cruby/resources/filepos.po
|
|
50
|
-
- test.cruby/resources/format.po
|
|
51
|
-
- test.cruby/resources/ok.po
|
|
52
|
-
- test.cruby/test_helper.rb
|
|
53
|
-
- test.cruby/tmp/.keep
|
|
54
33
|
homepage: https://git.disroot.org/gemmaro/ruby-gettextpo
|
|
55
34
|
licenses:
|
|
56
35
|
- GPL-3.0-or-later
|
data/.clang-format
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
BasedOnStyle: GNU
|
data/.clangd
DELETED
data/.dir-locals.el
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
;;; Directory Local Variables -*- no-byte-compile: t -*-
|
|
2
|
-
;;; For more information see (info "(emacs) Directory Variables")
|
|
3
|
-
|
|
4
|
-
((nil . ((eval . (progn (require 'grep)
|
|
5
|
-
(add-to-list 'grep-find-ignored-directories "tmp")
|
|
6
|
-
(add-to-list 'grep-find-ignored-directories "doc"))))))
|
data/.env.example
DELETED
data/.envrc
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Copyright (C) 2026 gemmaro
|
|
2
|
-
#
|
|
3
|
-
# This program is free software: you can redistribute it and/or modify
|
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
|
6
|
-
# (at your option) any later version.
|
|
7
|
-
#
|
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
-
# GNU General Public License for more details.
|
|
12
|
-
#
|
|
13
|
-
# You should have received a copy of the GNU General Public License
|
|
14
|
-
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
15
|
-
|
|
16
|
-
use guix
|
|
17
|
-
|
|
18
|
-
dotenv
|
|
19
|
-
|
|
20
|
-
if [ "$DEVELOP_MRUBY" != 'yes' ]
|
|
21
|
-
then
|
|
22
|
-
# CRuby
|
|
23
|
-
path_add C_INCLUDE_PATH "$(ruby -e "puts RbConfig::CONFIG['rubyhdrdir']")"
|
|
24
|
-
path_add C_INCLUDE_PATH "$(ruby -e "puts RbConfig::CONFIG['rubyarchhdrdir']")"
|
|
25
|
-
else
|
|
26
|
-
# mruby
|
|
27
|
-
env_vars_required MRUBY_SRC
|
|
28
|
-
path_add C_INCLUDE_PATH include
|
|
29
|
-
path_add C_INCLUDE_PATH "$MRUBY_SRC/include"
|
|
30
|
-
path_add C_INCLUDE_PATH "$MRUBY_SRC/build/host/include"
|
|
31
|
-
fi
|
data/.rdoc_options
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
main_page: README.md
|
|
2
|
-
exclude:
|
|
3
|
-
- tmp
|
|
4
|
-
- bin
|
|
5
|
-
- Rakefile
|
|
6
|
-
- Gemfile
|
|
7
|
-
- vendor
|
|
8
|
-
- test.cruby/**/*
|
|
9
|
-
- build_config.rb.lock
|
|
10
|
-
- mrbgem.rake
|
|
11
|
-
- mrblib/mrb_gettextpo.rb
|
|
12
|
-
- mrblib/mrb_gettextpo_version.rb
|
|
13
|
-
- manifest.scm
|
|
14
|
-
- ext/gettextpo/extconf.rb
|
data/build_config.rb
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# Copyright (C) 2026 gemmaro
|
|
2
|
-
#
|
|
3
|
-
# This program is free software: you can redistribute it and/or modify
|
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
|
6
|
-
# (at your option) any later version.
|
|
7
|
-
#
|
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
-
# GNU General Public License for more details.
|
|
12
|
-
#
|
|
13
|
-
# You should have received a copy of the GNU General Public License
|
|
14
|
-
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
15
|
-
|
|
16
|
-
MRuby::Build.new do |conf|
|
|
17
|
-
toolchain :gcc
|
|
18
|
-
conf.gem File.expand_path(File.dirname(__FILE__))
|
|
19
|
-
conf.linker.libraries << 'gettextpo'
|
|
20
|
-
conf.enable_test
|
|
21
|
-
conf.gem core: 'hal-posix-io'
|
|
22
|
-
conf.gem core: 'mruby-bin-mruby'
|
|
23
|
-
conf.gem core: 'mruby-bin-mirb'
|
|
24
|
-
conf.cc do |cc|
|
|
25
|
-
cc.flags << '-O0'
|
|
26
|
-
end
|
|
27
|
-
end
|
data/include/mrb_gettextpo.h
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/* Copyright (C) 2026 gemmaro
|
|
2
|
-
*
|
|
3
|
-
* This program is free software: you can redistribute it and/or modify
|
|
4
|
-
* it under the terms of the GNU General Public License as published by
|
|
5
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
6
|
-
* (at your option) any later version.
|
|
7
|
-
|
|
8
|
-
* This program is distributed in the hope that it will be useful,
|
|
9
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
-
* GNU General Public License for more details.
|
|
12
|
-
|
|
13
|
-
* You should have received a copy of the GNU General Public License
|
|
14
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef MRB_GETTEXTPO_H
|
|
18
|
-
#define MRB_GETTEXTPO_H
|
|
19
|
-
|
|
20
|
-
#include <mruby.h>
|
|
21
|
-
|
|
22
|
-
void mrb_gettextpo_gem_init(mrb_state *mrb);
|
|
23
|
-
|
|
24
|
-
#endif
|
data/manifest.scm
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
;; Copyright (C) 2026 gemmaro
|
|
2
|
-
;;
|
|
3
|
-
;; This program is free software: you can redistribute it and/or modify
|
|
4
|
-
;; it under the terms of the GNU General Public License as published by
|
|
5
|
-
;; the Free Software Foundation, either version 3 of the License, or
|
|
6
|
-
;; (at your option) any later version.
|
|
7
|
-
;;
|
|
8
|
-
;; This program is distributed in the hope that it will be useful,
|
|
9
|
-
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
-
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
-
;; GNU General Public License for more details.
|
|
12
|
-
;;
|
|
13
|
-
;; You should have received a copy of the GNU General Public License
|
|
14
|
-
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
15
|
-
|
|
16
|
-
(use-modules (guix packages)
|
|
17
|
-
(guix download)
|
|
18
|
-
(guix profiles)
|
|
19
|
-
(gnu packages gettext)
|
|
20
|
-
(gnu packages gdb)
|
|
21
|
-
(gnu packages commencement)
|
|
22
|
-
(gnu packages llvm)
|
|
23
|
-
(gnu packages ruby)
|
|
24
|
-
(gnu packages ruby-check)
|
|
25
|
-
(gnu packages base))
|
|
26
|
-
|
|
27
|
-
(define-public gnu-gettext-1.0
|
|
28
|
-
(package/inherit gnu-gettext
|
|
29
|
-
(version "1.0")
|
|
30
|
-
(source (origin
|
|
31
|
-
(method url-fetch)
|
|
32
|
-
(uri (string-append "mirror://gnu/gettext/gettext-" version
|
|
33
|
-
".tar.gz"))
|
|
34
|
-
(sha256 (base32
|
|
35
|
-
"06jgjxnm5xhw0d0zwl9birlwfxfgfqhk9q029j3h9941r5wrpnc5"))))))
|
|
36
|
-
|
|
37
|
-
(packages->manifest (list gnu-gettext-1.0
|
|
38
|
-
gcc-toolchain
|
|
39
|
-
gdb
|
|
40
|
-
clang
|
|
41
|
-
ruby-3.3
|
|
42
|
-
ruby-rake-compiler
|
|
43
|
-
gnu-make))
|
data/mrbgem.rake
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Copyright (C) 2026 gemmaro
|
|
2
|
-
#
|
|
3
|
-
# This program is free software: you can redistribute it and/or modify
|
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
|
6
|
-
# (at your option) any later version.
|
|
7
|
-
#
|
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
-
# GNU General Public License for more details.
|
|
12
|
-
#
|
|
13
|
-
# You should have received a copy of the GNU General Public License
|
|
14
|
-
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
15
|
-
|
|
16
|
-
MRuby::Gem::Specification.new('mruby-gettextpo') do |spec|
|
|
17
|
-
spec.license = 'GPL-3.0-or-later'
|
|
18
|
-
spec.authors = 'gemmaro'
|
|
19
|
-
spec.summary = 'GNU gettext PO parser for mruby'
|
|
20
|
-
spec.version = '0.1.0'
|
|
21
|
-
spec.homepage = 'https://git.disroot.org/gemmaro/ruby-gettextpo'
|
|
22
|
-
spec.linker.libraries << 'gettextpo'
|
|
23
|
-
spec.add_test_dependency 'mruby-io'
|
|
24
|
-
end
|
data/mrblib/mrb_gettextpo.rb
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# Copyright (C) 2026 gemmaro
|
|
2
|
-
#
|
|
3
|
-
# This program is free software: you can redistribute it and/or modify
|
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
|
6
|
-
# (at your option) any later version.
|
|
7
|
-
#
|
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
-
# GNU General Public License for more details.
|
|
12
|
-
#
|
|
13
|
-
# You should have received a copy of the GNU General Public License
|
|
14
|
-
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
15
|
-
|
|
16
|
-
module GettextPO
|
|
17
|
-
Error = Class.new(StandardError)
|
|
18
|
-
|
|
19
|
-
class File
|
|
20
|
-
class << self
|
|
21
|
-
# It seems that calling Proc with keyword arguments is not yet
|
|
22
|
-
# supported.
|
|
23
|
-
alias original_read read
|
|
24
|
-
def read(filename, xerror: nil, xerror2: nil)
|
|
25
|
-
original_read(filename,
|
|
26
|
-
xerror: xerror && Proc.new { |kwargs| xerror.(**kwargs) },
|
|
27
|
-
xerror2: xerror2 && Proc.new { |kwargs| xerror2.(**kwargs) })
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# It seems that calling Proc with keyword arguments is not yet
|
|
32
|
-
# supported.
|
|
33
|
-
alias original_check_all check_all
|
|
34
|
-
def check_all(xerror: nil, xerror2: nil)
|
|
35
|
-
original_check_all(xerror: xerror && Proc.new { |kwargs| xerror.(**kwargs) },
|
|
36
|
-
xerror2: xerror2 && Proc.new { |kwargs| xerror2.(**kwargs) })
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
class Message
|
|
41
|
-
# It seems that calling Proc with keyword arguments is not yet
|
|
42
|
-
# supported.
|
|
43
|
-
alias original_check_all check_all
|
|
44
|
-
def check_all(iterator, xerror: nil, xerror2: nil)
|
|
45
|
-
original_check_all(iterator,
|
|
46
|
-
xerror: xerror && Proc.new { |kwargs| xerror.(**kwargs) },
|
|
47
|
-
xerror2: xerror2 && Proc.new { |kwargs| xerror2.(**kwargs) })
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
# It seems that calling Proc with keyword arguments is not yet
|
|
51
|
-
# supported.
|
|
52
|
-
alias original_check_format check_format
|
|
53
|
-
def check_format(xerror: nil, xerror2: nil)
|
|
54
|
-
original_check_format(xerror: xerror && Proc.new { |kwargs| xerror.(**kwargs) },
|
|
55
|
-
xerror2: xerror2 && Proc.new { |kwargs| xerror2.(**kwargs) })
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
end
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
#--
|
|
4
|
-
# Copyright (C) 2026 gemmaro
|
|
5
|
-
#
|
|
6
|
-
# This program is free software: you can redistribute it and/or modify
|
|
7
|
-
# it under the terms of the GNU General Public License as published by
|
|
8
|
-
# the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
# (at your option) any later version.
|
|
10
|
-
#
|
|
11
|
-
# This program is distributed in the hope that it will be useful,
|
|
12
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
# GNU General Public License for more details.
|
|
15
|
-
#
|
|
16
|
-
# You should have received a copy of the GNU General Public License
|
|
17
|
-
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
18
|
-
#++
|
|
19
|
-
|
|
20
|
-
module GettextPO
|
|
21
|
-
# Version of this gem.
|
|
22
|
-
VERSION = "0.2.0"
|
|
23
|
-
end
|
data/sig/gettextpo.rbs
DELETED