Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .dir-locals.el
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
;;; Directory Local Variables -*- no-byte-compile: t -*-
;;; For more information see (info "(emacs) Directory Variables")

((nil . ((eval . (progn (add-to-list 'grep-find-ignored-directories "tmp")
((nil . ((eval . (progn (require 'grep)
(add-to-list 'grep-find-ignored-directories "tmp")
(add-to-list 'grep-find-ignored-directories "doc"))))))
40 changes: 40 additions & 0 deletions .github/workflows/doc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build and deploy documentation to GitHub Pages
on:
push:
branches: [ "main" ]
pull_request:
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
bundler-cache: true

- name: Run RDoc
run: rdoc

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: doc

deploy:
needs: build-and-deploy
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
permissions:
id-token: write
pages: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
1 change: 1 addition & 0 deletions .rdoc_options
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ exclude:
- bin
- Rakefile
- Gemfile
- vendor
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Change log of Ruby GettextPO gem

## [Unreleased]
## Unreleased

## [0.1.0] - 2026-03-07
- Add libgettextpo version constant.
- Add severities constants.

## 0.1.0 - 2026-03-07

- Initial release
32 changes: 10 additions & 22 deletions ext/gettextpo/gettextpo.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,9 @@

#include "gettextpo.h"
#include <gettext-po.h>
#include <ruby/internal/anyargs.h>
#include <ruby.h>
#include <ruby/internal/arithmetic/int.h>
#include <ruby/internal/core/rdata.h>
#include <ruby/internal/core/rstring.h>
#include <ruby/internal/core/rtypeddata.h>
#include <ruby/internal/eval.h>
#include <ruby/internal/globals.h>
#include <ruby/internal/intern/array.h>
#include <ruby/internal/intern/hash.h>
#include <ruby/internal/intern/object.h>
#include <ruby/internal/intern/proc.h>
#include <ruby/internal/intern/range.h>
#include <ruby/internal/intern/string.h>
#include <ruby/internal/intern/vm.h>
#include <ruby/internal/module.h>
#include <ruby/internal/scan_args.h>
#include <ruby/internal/special_consts.h>
#include <ruby/internal/symbol.h>
#include <ruby/internal/value.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
#include <time.h>
#include <ruby/internal/variable.h>

VALUE rb_cMessage;
VALUE rb_cMessageIterator;
Expand Down Expand Up @@ -845,6 +825,14 @@ RUBY_FUNC_EXPORTED void
Init_gettextpo (void)
{
VALUE rb_mGettextPO = rb_define_module ("GettextPO");
rb_define_const (rb_mGettextPO, "LIBGETTEXTPO_VERSION",
INT2NUM (libgettextpo_version));
rb_define_const (rb_mGettextPO, "SEVERITY_WARNING",
INT2NUM (PO_SEVERITY_WARNING));
rb_define_const (rb_mGettextPO, "SEVERITY_ERROR",
INT2NUM (PO_SEVERITY_ERROR));
rb_define_const (rb_mGettextPO, "SEVERITY_FATAL_ERROR",
INT2NUM (PO_SEVERITY_FATAL_ERROR));
rb_define_singleton_method (rb_mGettextPO, "header_entry_value",
gettextpo_m_header_entry_value, 2);
rb_define_singleton_method (rb_mGettextPO, "header_with_updated_entry_value",
Expand Down
2 changes: 2 additions & 0 deletions test/gettextpo_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class GettextPOTest < Test::Unit::TestCase
assert do
::GettextPO.const_defined?(:VERSION)
end

assert_compare 2944, '<=', GettextPO::LIBGETTEXTPO_VERSION
end

test "GettextPO::File.new" do
Expand Down
Loading