commit rubygem-gettext-setup for openSUSE:Factory
Hello community, here is the log from the commit of package rubygem-gettext-setup for openSUSE:Factory checked in at 2020-03-07 21:38:11 Comparing /work/SRC/openSUSE:Factory/rubygem-gettext-setup (Old) and /work/SRC/openSUSE:Factory/.rubygem-gettext-setup.new.26092 (New) Package is "rubygem-gettext-setup" Sat Mar 7 21:38:11 2020 rev:13 rq:773764 version:0.34 Changes: --- /work/SRC/openSUSE:Factory/rubygem-gettext-setup/rubygem-gettext-setup.changes 2019-06-18 14:57:51.405348235 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-gettext-setup.new.26092/rubygem-gettext-setup.changes 2020-03-07 21:38:12.788271120 +0100 @@ -1,0 +2,6 @@ +Mon Feb 10 14:40:22 UTC 2020 - Stephan Kulow + +- updated to version 0.34 + no changelog found + +--- Old: gettext-setup-0.30.gem New: gettext-setup-0.34.gem Other differences: -- ++ rubygem-gettext-setup.spec ++ --- /var/tmp/diff_new_pack.eSHkM9/_old 2020-03-07 21:38:14.424272224 +0100 +++ /var/tmp/diff_new_pack.eSHkM9/_new 2020-03-07 21:38:14.424272224 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-gettext-setup # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -24,7 +24,7 @@ # Name: rubygem-gettext-setup -Version:0.30 +Version:0.34 Release:0 %define mod_name gettext-setup %define mod_full_name %{mod_name}-%{version} @@ -32,7 +32,7 @@ BuildRequires: %{ruby >= 1.9.2} BuildRequires: %{rubygem gem2rpm} BuildRequires: ruby-macros >= 5 -Url:https://github.com/puppetlabs/gettext-setup-gem +URL:https://github.com/puppetlabs/gettext-setup-gem Source: https://rubygems.org/gems/%{mod_full_name}.gem Source1:gem2rpm.yml Summary:A gem to ease internationalization with fast_gettext ++ gettext-setup-0.30.gem -> gettext-setup-0.34.gem ++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2018-02-12 19:21:38.0 +0100 +++ new/README.md 2020-01-10 10:19:22.0 +0100 @@ -67,7 +67,7 @@ Pluralization rules vary across languages. The pluralization rules are specified in the PO file and look something like this `Plural-Forms: nplurals=2; plural=(n > 1);`. This is the pluralization rule for German. It means that German has two pluralization rules. The first rule is `plural=n > 1)` and the second rule is all other counts. -Plurals are selected from the PO file by index. +Plurals are selected from the PO file by index. Here's an example of how a pluralized string is handled in a PO file: @@ -84,7 +84,7 @@ The two `msgstr` lines show that German has two rules for pluralization. The indices map to the `Plural-Forms: nplurals=2; plural=(n > 1);` rule that we specified in the PO file. The `[0]` index represents `plural=(n > 1)` and the `[1]` index represents all other pluralization cases (in other words, when the count equals 0 or 1). -When Transifex generates a PO file for a specific language, it automatically adds the appropriate pluralization rules in the PO file. +When Transifex generates a PO file for a specific language, it automatically adds the appropriate pluralization rules in the PO file. ### Comments To provide translators with some contextual information or instructions about a string, precede the string with a comment using `#. `. The comment gets pulled in to the POT file and will show up as a comment in Transifex. @@ -99,7 +99,7 @@ 3. When a POT file is updated, the Transifex webhook pushes the new POT file to Transifex ready for translation. (If your POT file hasn't been added to the Transifex integration yet, you will need to get it added.) -4. When a PO file reaches 100% translated and reviewed, a webhook pushes it back to the source repo ready to be consumed by your app. +4. When a PO file reaches 100% translated and reviewed, a webhook pushes it back to the source repo ready to be consumed by your app. 5. Your app checks the user's locale settings (the browser settings for web apps, or the system settings for the CLI). If we support the user's preferred locale, the app will display strings in the
commit rubygem-gettext-setup for openSUSE:Factory
Hello community, here is the log from the commit of package rubygem-gettext-setup for openSUSE:Factory checked in at 2019-06-18 14:57:41 Comparing /work/SRC/openSUSE:Factory/rubygem-gettext-setup (Old) and /work/SRC/openSUSE:Factory/.rubygem-gettext-setup.new.4811 (New) Package is "rubygem-gettext-setup" Tue Jun 18 14:57:41 2019 rev:12 rq:709790 version:0.30 Changes: --- /work/SRC/openSUSE:Factory/rubygem-gettext-setup/rubygem-gettext-setup.changes 2017-09-26 21:14:35.029035346 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-gettext-setup.new.4811/rubygem-gettext-setup.changes 2019-06-18 14:57:51.405348235 +0200 @@ -1,0 +2,12 @@ +Tue Feb 13 05:29:45 UTC 2018 - factory-a...@kulow.org + +- updated to version 0.30 + no changelog found + +--- +Sun Dec 3 19:17:43 UTC 2017 - co...@suse.com + +- updated to version 0.29 + no changelog found + +--- Old: gettext-setup-0.28.gem New: gettext-setup-0.30.gem Other differences: -- ++ rubygem-gettext-setup.spec ++ --- /var/tmp/diff_new_pack.3Ci7sm/_old 2019-06-18 14:57:53.129347204 +0200 +++ /var/tmp/diff_new_pack.3Ci7sm/_new 2019-06-18 14:57:53.177347175 +0200 @@ -1,7 +1,7 @@ # # spec file for package rubygem-gettext-setup # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-gettext-setup -Version:0.28 +Version:0.30 Release:0 %define mod_name gettext-setup %define mod_full_name %{mod_name}-%{version} @@ -33,7 +33,7 @@ BuildRequires: %{rubygem gem2rpm} BuildRequires: ruby-macros >= 5 Url:https://github.com/puppetlabs/gettext-setup-gem -Source: http://rubygems.org/gems/%{mod_full_name}.gem +Source: https://rubygems.org/gems/%{mod_full_name}.gem Source1:gem2rpm.yml Summary:A gem to ease internationalization with fast_gettext License:Apache-2.0 ++ gettext-setup-0.28.gem -> gettext-setup-0.30.gem ++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2017-09-01 23:10:50.0 +0200 +++ new/README.md 2018-02-12 19:21:38.0 +0100 @@ -1,6 +1,6 @@ # gettext-setup gem -This is a simple gem to set up i18n for Ruby projects (including [Sinatra](www.sinatrarb.com/) web apps) using gettext and fast gettext. +This is a simple gem to set up i18n for Ruby projects (including [Sinatra](http://www.sinatrarb.com/) web apps) using gettext and fast gettext. This project sets the default locale to English. If the user has set a different locale in their browser preferences, and we support the user's preferred locale, strings and data formatting will be customized for that locale. @@ -16,34 +16,34 @@ ## Setup for your project -These are the poignant bits of this example that you need to replicate in -your project: +These are the poignant bits of this example that you need to replicate in your project: 1. Add `gem 'gettext-setup'` to your `Gemfile`. -1. Copy `locales/config-sample.yaml` to your project and put it into a +2. Copy `locales/config-sample.yaml` to your project and put it into a `locales` directory as `config.yaml`. -1. Edit `locales/config.yaml` and make the necessary changes for your - project -1. Add these three lines to your `Rakefile`, ensuring the `locales` - directory is found by the last line: -``` -spec = Gem::Specification.find_by_name 'gettext-setup' -load "#{spec.gem_dir}/lib/tasks/gettext.rake" -GettextSetup.initialize(File.absolute_path('locales', File.dirname(__FILE__))) -``` -1. Add these lines at the start of your app (`app.rb` for server-side, the executable binary for CLI applications): -`require 'gettext-setup'` -`GettextSetup.initialize(File.absolute_path('locales', File.dirname(__FILE__)))` -(Note that the second line may require modification to find the `locales` directory. -1. For client-side applications, add this line: -`GettextSetup.negotiate_locale!(GettextSetup.candidate_locales)` -1. For server-side applications, add these lines: -``` -before do - GettextSetup.negotiate_locale!(env["HTTP_ACCEPT_LANGUAGE"]) -end -``` - +3. Edit `locales/config.yaml` and make the necessary changes for your project +4. Add these three lines to your `Rakefile`, ensuring the `locales` directory is found by the last line: +
commit rubygem-gettext-setup for openSUSE:Factory
Hello community, here is the log from the commit of package rubygem-gettext-setup for openSUSE:Factory checked in at 2017-09-26 21:13:48 Comparing /work/SRC/openSUSE:Factory/rubygem-gettext-setup (Old) and /work/SRC/openSUSE:Factory/.rubygem-gettext-setup.new (New) Package is "rubygem-gettext-setup" Tue Sep 26 21:13:48 2017 rev:11 rq:520438 version:0.28 Changes: --- /work/SRC/openSUSE:Factory/rubygem-gettext-setup/rubygem-gettext-setup.changes 2017-06-08 15:02:04.530878128 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-gettext-setup.new/rubygem-gettext-setup.changes 2017-09-26 21:14:35.029035346 +0200 @@ -1,0 +2,12 @@ +Sun Sep 3 09:03:19 UTC 2017 - co...@suse.com + +- updated to version 0.28 + no changelog found + +--- +Thu Aug 3 19:17:06 UTC 2017 - co...@suse.com + +- updated to version 0.26 + no changelog found + +--- Old: gettext-setup-0.25.gem New: gettext-setup-0.28.gem Other differences: -- ++ rubygem-gettext-setup.spec ++ --- /var/tmp/diff_new_pack.msElKM/_old 2017-09-26 21:14:36.580817184 +0200 +++ /var/tmp/diff_new_pack.msElKM/_new 2017-09-26 21:14:36.584816622 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-gettext-setup -Version:0.25 +Version:0.28 Release:0 %define mod_name gettext-setup %define mod_full_name %{mod_name}-%{version} ++ gettext-setup-0.25.gem -> gettext-setup-0.28.gem ++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2017-05-30 20:09:42.0 +0200 +++ new/README.md 2017-09-01 23:10:50.0 +0200 @@ -99,3 +99,14 @@ 4. When a PO file reaches 100% translated and reviewed, a webhook pushes it back to the source repo ready to be consumed by your app. 5. Your app checks the user's locale settings (the browser settings for web apps, or the system settings for the CLI). If we support the user's preferred locale, the app will display strings in the user's language. Otherwise, it defaults to English. + +## Merge Pot files rake task + +The rake task that merges .pot files is present for the internationalisation of a module. This task uses 'msgcat', which is only natively present on OSes that are GNU based. For running this task locally on another OS you will need to download the gettext pkg and install it locally: +https://pkgs.org/download/gettext + +This task will run within the gettext setup locales_path provided by GettextSetup. The result will be a merged pot file created from all pot files kept in this location. + +By default the merged pot file is locales_path/project_name.pot. This can be overridden when calling the method by providing a chosen path. + +Please note: Since the default merged file name is project_name.pot, it will override anything of that name within the locales directory. Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/generate_metadata_pot.rb new/lib/generate_metadata_pot.rb --- old/lib/generate_metadata_pot.rb1970-01-01 01:00:00.0 +0100 +++ new/lib/generate_metadata_pot.rb2017-09-01 23:10:50.0 +0200 @@ -0,0 +1 @@ +require 'metadata_pot/metadata_pot' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gettext-setup/gettext_setup.rb new/lib/gettext-setup/gettext_setup.rb --- old/lib/gettext-setup/gettext_setup.rb 2017-05-30 20:09:42.0 +0200 +++ new/lib/gettext-setup/gettext_setup.rb 2017-09-01 23:10:50.0 +0200 @@ -98,7 +98,7 @@ explicit = Dir.glob(File.absolute_path('*/*.po', locales_path)).map do |x| File.basename(File.dirname(x)) end -(explicit + [default_locale]).uniq +([default_locale] + explicit).uniq end # Given an HTTP Accept-Language header return the locale with the highest @@ -112,6 +112,10 @@ available_locales = accept_header.split(',').map do |locale| pair = locale.strip.split(';q=') pair << '1.0' unless pair.size == 2 + # Ignore everything but the language itself; that means that we treat + # 'de' and 'de-DE' identical, and would use the 'de' message catalog + # for both. + pair[0] = pair[0].split('-')[0] pair[0] = FastGettext.default_locale if pair[0] == '*' pair end.sort_by do |(_, qvalue)| diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gettext-setup/pot.rb new/lib/gettext-setup/pot.rb --- old/lib/gettext-setup/pot.rb
commit rubygem-gettext-setup for openSUSE:Factory
Hello community, here is the log from the commit of package rubygem-gettext-setup for openSUSE:Factory checked in at 2017-06-08 15:02:03 Comparing /work/SRC/openSUSE:Factory/rubygem-gettext-setup (Old) and /work/SRC/openSUSE:Factory/.rubygem-gettext-setup.new (New) Package is "rubygem-gettext-setup" Thu Jun 8 15:02:03 2017 rev:10 rq:499981 version:0.25 Changes: --- /work/SRC/openSUSE:Factory/rubygem-gettext-setup/rubygem-gettext-setup.changes 2017-04-20 20:58:38.018771150 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-gettext-setup.new/rubygem-gettext-setup.changes 2017-06-08 15:02:04.530878128 +0200 @@ -1,0 +2,12 @@ +Wed May 31 07:18:40 UTC 2017 - co...@suse.com + +- updated to version 0.25 + no changelog found + +--- +Tue May 23 09:54:04 UTC 2017 - co...@suse.com + +- updated to version 0.24 + no changelog found + +--- Old: gettext-setup-0.21.gem New: gettext-setup-0.25.gem Other differences: -- ++ rubygem-gettext-setup.spec ++ --- /var/tmp/diff_new_pack.TErhfK/_old 2017-06-08 15:02:05.470745485 +0200 +++ /var/tmp/diff_new_pack.TErhfK/_new 2017-06-08 15:02:05.474744921 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-gettext-setup -Version:0.21 +Version:0.25 Release:0 %define mod_name gettext-setup %define mod_full_name %{mod_name}-%{version} ++ gettext-setup-0.21.gem -> gettext-setup-0.25.gem ++ 1916 lines of diff (skipped) retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/README.md new/README.md --- old/README.md 2017-04-08 00:27:08.0 +0200 +++ new/README.md 2017-05-30 20:09:42.0 +0200 @@ -36,11 +36,11 @@ `GettextSetup.initialize(File.absolute_path('locales', File.dirname(__FILE__)))` (Note that the second line may require modification to find the `locales` directory. 1. For client-side applications, add this line: -`FastGettext.locale = GettextSetup.negotiate_locale(GettextSetup.candidate_locales)` +`GettextSetup.negotiate_locale!(GettextSetup.candidate_locales)` 1. For server-side applications, add these lines: ``` before do - FastGettext.locale = GettextSetup.negotiate_locale(env["HTTP_ACCEPT_LANGUAGE"]) + GettextSetup.negotiate_locale!(env["HTTP_ACCEPT_LANGUAGE"]) end ``` Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lib/gettext-setup/gettext_setup.rb new/lib/gettext-setup/gettext_setup.rb --- old/lib/gettext-setup/gettext_setup.rb 2017-04-08 00:27:08.0 +0200 +++ new/lib/gettext-setup/gettext_setup.rb 2017-05-30 20:09:42.0 +0200 @@ -5,6 +5,12 @@ require 'locale' module GettextSetup + class NoConfigFoundError < RuntimeError +def initialize(path) + super("No config.yaml found! (searching: #{path})") +end + end + @config = nil @translation_repositories = {} FastGettext.default_available_locales = [] @@ -16,8 +22,10 @@ # - if using .mo files, an LC_MESSAGES dir in each language dir, with the .mo file in it # valid `options` fields: # :file_format - one of the supported backends for fast_gettext (e.g. :po, :mo, :yaml, etc.) - def self.initialize(locales_path, options = {}) + def self.initialize(locales_path = 'locales', options = {}) config_path = File.absolute_path('config.yaml', locales_path) +File.exist?(config_path) || raise(NoConfigFoundError, config_path) + @config = YAML.load_file(config_path)['gettext'] @locales_path = locales_path @@ -41,6 +49,11 @@ Locale.set_default(default_locale) end + def self.config? +raise NoConfigFoundError, File.join(locales_path, 'config.yaml') unless @config +@config + end + def self.add_repository_to_chain(project_name, options) repository = FastGettext::TranslationRepository.build(project_name, path: locales_path, @@ -50,7 +63,7 @@ end def self.locales_path -@locales_path +@locales_path ||= File.join(Dir.pwd, 'locales') end
commit rubygem-gettext-setup for openSUSE:Factory
Hello community, here is the log from the commit of package rubygem-gettext-setup for openSUSE:Factory checked in at 2017-04-20 20:58:36 Comparing /work/SRC/openSUSE:Factory/rubygem-gettext-setup (Old) and /work/SRC/openSUSE:Factory/.rubygem-gettext-setup.new (New) Package is "rubygem-gettext-setup" Thu Apr 20 20:58:36 2017 rev:9 rq:489045 version:0.21 Changes: --- /work/SRC/openSUSE:Factory/rubygem-gettext-setup/rubygem-gettext-setup.changes 2017-04-17 10:27:23.001104596 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-gettext-setup.new/rubygem-gettext-setup.changes 2017-04-20 20:58:38.018771150 +0200 @@ -1,0 +2,6 @@ +Thu Apr 13 04:30:41 UTC 2017 - co...@suse.com + +- updated to version 0.21 + no changelog found + +--- Old: gettext-setup-0.20.gem New: gettext-setup-0.21.gem Other differences: -- ++ rubygem-gettext-setup.spec ++ --- /var/tmp/diff_new_pack.OGRpJo/_old 2017-04-20 20:58:38.746668209 +0200 +++ /var/tmp/diff_new_pack.OGRpJo/_new 2017-04-20 20:58:38.750667643 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-gettext-setup -Version:0.20 +Version:0.21 Release:0 %define mod_name gettext-setup %define mod_full_name %{mod_name}-%{version} ++ gettext-setup-0.20.gem -> gettext-setup-0.21.gem ++ Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/tasks/gettext.rake new/lib/tasks/gettext.rake --- old/lib/tasks/gettext.rake 2017-03-30 00:23:16.0 +0200 +++ new/lib/tasks/gettext.rake 2017-04-08 00:27:08.0 +0200 @@ -2,56 +2,12 @@ # puts File.absolute_path('Gemfile', Dir.pwd) # Bundler.read_file(File.absolute_path('Gemfile', Dir.pwd)) # -require 'open3' require_relative '../gettext-setup/gettext_setup' +require_relative 'task_helper.rb' # # GettextSetup.initialize(File.absolute_path('locales', Dir.pwd)) namespace :gettext do - def locale_path -GettextSetup.locales_path - end - - def text_domain -FastGettext.text_domain - end - - def files_to_translate -files = GettextSetup.config['source_files'].map do |p| - Dir.glob(p) -end.flatten -# check for optional list of files to exclude from string -# extraction -exclusions = (GettextSetup.config['exclude_files'] || []).map do |p| - Dir.glob(p) -end.flatten - -# if file is a directory, take it out of the array. directories -# cause rxgettext to error out. -(files - exclusions).reject { |file| File.directory?(file) } - end - - def pot_file_path -File.join(locale_path, GettextSetup.config['project_name'] + '.pot') - end - - def generate_new_pot -config = GettextSetup.config -package_name = config['package_name'] -project_name = config['project_name'] -bugs_address = config['bugs_address'] -copyright_holder = config['copyright_holder'] -# Done this way to allow the user to enter an empty string in the config. -comments_tag = config.key?('comments_tag') ? config['comments_tag'] : 'TRANSLATORS' -version = `git describe` -system("rxgettext -o locales/#{project_name}.pot --no-wrap --sort-by-file " \ - "--add-comments#{comments_tag.to_s == '' ? '' : '=' + comments_tag} --msgid-bugs-address '#{bugs_address}' " \ - "--package-name '#{package_name}' " \ - "--package-version '#{version}' " \ - "--copyright-holder='#{copyright_holder}' --copyright-year=#{Time.now.year} " + - files_to_translate.join(' ')) - end - desc 'Generate a new POT file and replace old if strings changed' task :update_pot do if !File.exist? pot_file_path @@ -61,18 +17,12 @@ old_pot = pot_file_path + '.old' File.rename(pot_file_path, old_pot) generate_new_pot - begin -_, stderr, status = Open3.capture3("msgcmp --use-untranslated '#{old_pot}' '#{pot_file_path}'") -if status == 1 || /this message is not used/.match(stderr) - File.delete(old_pot) - puts 'String changes detected, replacing with updated POT file' -else - puts 'No string changes detected, keeping old POT file' - File.rename(old_pot, pot_file_path) -end - rescue IOError -# Ignore; probably means msgcmp isn't installed. + if string_changes?(old_pot, pot_file_path) File.delete(old_pot) +puts 'String changes detected, replacing with updated POT file' + else +puts 'No string changes detected, keeping old POT file' +File.rename(old_pot, pot_file_path) end end end diff -urN '--exclude=CVS'
commit rubygem-gettext-setup for openSUSE:Factory
Hello community, here is the log from the commit of package rubygem-gettext-setup for openSUSE:Factory checked in at 2017-04-17 10:27:18 Comparing /work/SRC/openSUSE:Factory/rubygem-gettext-setup (Old) and /work/SRC/openSUSE:Factory/.rubygem-gettext-setup.new (New) Package is "rubygem-gettext-setup" Mon Apr 17 10:27:18 2017 rev:8 rq:487596 version:0.20 Changes: --- /work/SRC/openSUSE:Factory/rubygem-gettext-setup/rubygem-gettext-setup.changes 2017-04-11 09:32:58.888330577 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-gettext-setup.new/rubygem-gettext-setup.changes 2017-04-17 10:27:23.001104596 +0200 @@ -1,0 +2,6 @@ +Thu Mar 30 04:31:56 UTC 2017 - co...@suse.com + +- updated to version 0.20 + no changelog found + +--- Old: gettext-setup-0.18.gem New: gettext-setup-0.20.gem Other differences: -- ++ rubygem-gettext-setup.spec ++ --- /var/tmp/diff_new_pack.I1evlR/_old 2017-04-17 10:27:24.52402 +0200 +++ /var/tmp/diff_new_pack.I1evlR/_new 2017-04-17 10:27:24.52235 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-gettext-setup -Version:0.18 +Version:0.20 Release:0 %define mod_name gettext-setup %define mod_full_name %{mod_name}-%{version} ++ gettext-setup-0.18.gem -> gettext-setup-0.20.gem ++ Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gettext-setup/gettext_setup.rb new/lib/gettext-setup/gettext_setup.rb --- old/lib/gettext-setup/gettext_setup.rb 2017-03-22 00:05:44.0 +0100 +++ new/lib/gettext-setup/gettext_setup.rb 2017-03-30 00:23:16.0 +0200 @@ -1,11 +1,12 @@ # -*- encoding: utf-8 -*- + require 'fast_gettext' require 'yaml' require 'locale' module GettextSetup - @@config = nil - @@translation_repositories = {} + @config = nil + @translation_repositories = {} FastGettext.default_available_locales = [] # `locales_path` should include: @@ -17,8 +18,8 @@ # :file_format - one of the supported backends for fast_gettext (e.g. :po, :mo, :yaml, etc.) def self.initialize(locales_path, options = {}) config_path = File.absolute_path('config.yaml', locales_path) -@@config = YAML.load_file(config_path)['gettext'] -@@locales_path = locales_path +@config = YAML.load_file(config_path)['gettext'] +@locales_path = locales_path # Make the translation methods available everywhere Object.send(:include, FastGettext::Translation) @@ -30,7 +31,7 @@ # 'chain' is the only available multi-domain type in fast_gettext 1.1.0 We should consider # investigating 'merge' once we can bump our dependency -FastGettext.add_text_domain('master_domain', type: :chain, chain: @@translation_repositories.values) +FastGettext.add_text_domain('master_domain', type: :chain, chain: @translation_repositories.values) FastGettext.default_text_domain = 'master_domain' # Likewise, be explicit in our default language choice. @@ -40,31 +41,31 @@ Locale.set_default(default_locale) end - def self.add_repository_to_chain(project_name,options) + def self.add_repository_to_chain(project_name, options) repository = FastGettext::TranslationRepository.build(project_name, - :path => locales_path, - :type => options[:file_format] || :po, - :ignore_fuzzy => false) -@@translation_repositories[project_name] = repository unless @@translation_repositories.key? project_name + path: locales_path, + type: options[:file_format] || :po, + ignore_fuzzy: false) +@translation_repositories[project_name] = repository unless @translation_repositories.key? project_name end def self.locales_path -@@locales_path +@locales_path end def self.config -@@config ||= {} +@config ||= {} end def self.translation_repositories -@@translation_repositories +@translation_repositories end def self.default_locale -config['default_locale'] || "en" +config['default_locale'] || 'en' end - def self.set_default_locale(new_locale) + def self.default_locale=(new_locale) FastGettext.default_locale = new_locale Locale.set_default(new_locale) config['default_locale'] = new_locale @@ -81,31 +82,31 @@ end def self.locales -
commit rubygem-gettext-setup for openSUSE:Factory
Hello community, here is the log from the commit of package rubygem-gettext-setup for openSUSE:Factory checked in at 2017-04-11 09:32:58 Comparing /work/SRC/openSUSE:Factory/rubygem-gettext-setup (Old) and /work/SRC/openSUSE:Factory/.rubygem-gettext-setup.new (New) Package is "rubygem-gettext-setup" Tue Apr 11 09:32:58 2017 rev:7 rq:482296 version:0.18 Changes: --- /work/SRC/openSUSE:Factory/rubygem-gettext-setup/rubygem-gettext-setup.changes 2017-01-25 23:27:27.365500971 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-gettext-setup.new/rubygem-gettext-setup.changes 2017-04-11 09:32:58.888330577 +0200 @@ -1,0 +2,24 @@ +Wed Mar 22 05:29:45 UTC 2017 - co...@suse.com + +- updated to version 0.18 + no changelog found + +--- +Thu Mar 16 05:31:42 UTC 2017 - co...@suse.com + +- updated to version 0.16 + no changelog found + +--- +Fri Mar 3 05:57:40 UTC 2017 - co...@suse.com + +- updated to version 0.14 + no changelog found + +--- +Wed Jan 25 05:34:49 UTC 2017 - co...@suse.com + +- updated to version 0.13 + no changelog found + +--- Old: gettext-setup-0.12.gem New: gettext-setup-0.18.gem Other differences: -- ++ rubygem-gettext-setup.spec ++ --- /var/tmp/diff_new_pack.D2HgpT/_old 2017-04-11 09:32:59.636224927 +0200 +++ /var/tmp/diff_new_pack.D2HgpT/_new 2017-04-11 09:32:59.636224927 +0200 @@ -24,13 +24,13 @@ # Name: rubygem-gettext-setup -Version:0.12 +Version:0.18 Release:0 %define mod_name gettext-setup %define mod_full_name %{mod_name}-%{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: %{ruby >= 1.9.2} BuildRequires: %{rubygem gem2rpm} -BuildRequires: %{ruby} BuildRequires: ruby-macros >= 5 Url:https://github.com/puppetlabs/gettext-setup-gem Source: http://rubygems.org/gems/%{mod_full_name}.gem ++ gettext-setup-0.12.gem -> gettext-setup-0.18.gem ++ Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gettext-setup/gettext_setup.rb new/lib/gettext-setup/gettext_setup.rb --- old/lib/gettext-setup/gettext_setup.rb 2017-01-18 19:57:49.0 +0100 +++ new/lib/gettext-setup/gettext_setup.rb 2017-03-22 00:05:44.0 +0100 @@ -5,6 +5,8 @@ module GettextSetup @@config = nil + @@translation_repositories = {} + FastGettext.default_available_locales = [] # `locales_path` should include: # - config.yaml @@ -24,19 +26,28 @@ # Define our text domain, and set the path into our root. I would prefer to # have something smarter, but we really want this up earlier even than our # config loading happens so that errors there can be translated. -FastGettext.add_text_domain(config['project_name'], -:path => locales_path, -:type => options[:file_format] || :po, -:ignore_fuzzy => false) -FastGettext.default_text_domain = config['project_name'] +add_repository_to_chain(config['project_name'], options) + +# 'chain' is the only available multi-domain type in fast_gettext 1.1.0 We should consider +# investigating 'merge' once we can bump our dependency +FastGettext.add_text_domain('master_domain', type: :chain, chain: @@translation_repositories.values) +FastGettext.default_text_domain = 'master_domain' # Likewise, be explicit in our default language choice. FastGettext.default_locale = default_locale -FastGettext.default_available_locales = locales +FastGettext.default_available_locales = FastGettext.default_available_locales | locales Locale.set_default(default_locale) end + def self.add_repository_to_chain(project_name,options) +repository = FastGettext::TranslationRepository.build(project_name, + :path => locales_path, + :type => options[:file_format] || :po, + :ignore_fuzzy => false) +@@translation_repositories[project_name] = repository unless @@translation_repositories.key? project_name + end + def self.locales_path @@locales_path end @@ -45,6 +56,10 @@ @@config ||= {} end + def self.translation_repositories +@@translation_repositories + end + def
commit rubygem-gettext-setup for openSUSE:Factory
Hello community, here is the log from the commit of package rubygem-gettext-setup for openSUSE:Factory checked in at 2017-01-25 23:27:26 Comparing /work/SRC/openSUSE:Factory/rubygem-gettext-setup (Old) and /work/SRC/openSUSE:Factory/.rubygem-gettext-setup.new (New) Package is "rubygem-gettext-setup" Changes: --- /work/SRC/openSUSE:Factory/rubygem-gettext-setup/rubygem-gettext-setup.changes 2017-01-15 11:17:49.804511883 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-gettext-setup.new/rubygem-gettext-setup.changes 2017-01-25 23:27:27.365500971 +0100 @@ -1,0 +2,6 @@ +Thu Jan 19 05:34:16 UTC 2017 - co...@suse.com + +- updated to version 0.12 + no changelog found + +--- Old: gettext-setup-0.11.gem New: gettext-setup-0.12.gem Other differences: -- ++ rubygem-gettext-setup.spec ++ --- /var/tmp/diff_new_pack.gJCPCR/_old 2017-01-25 23:27:27.773439474 +0100 +++ /var/tmp/diff_new_pack.gJCPCR/_new 2017-01-25 23:27:27.773439474 +0100 @@ -24,7 +24,7 @@ # Name: rubygem-gettext-setup -Version:0.11 +Version:0.12 Release:0 %define mod_name gettext-setup %define mod_full_name %{mod_name}-%{version} ++ gettext-setup-0.11.gem -> gettext-setup-0.12.gem ++ Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gettext-setup/gettext_setup.rb new/lib/gettext-setup/gettext_setup.rb --- old/lib/gettext-setup/gettext_setup.rb 2017-01-06 20:41:05.0 +0100 +++ new/lib/gettext-setup/gettext_setup.rb 2017-01-18 19:57:49.0 +0100 @@ -42,19 +42,29 @@ end def self.config -@@config +@@config ||= {} end def self.default_locale config['default_locale'] || "en" end + def self.set_default_locale(new_locale) +FastGettext.default_locale = new_locale +Locale.set_default(new_locale) +config['default_locale'] = new_locale + end + # Returns the locale for the current machine. This is most useful for shell # applications that need an ACCEPT-LANGUAGE header set. def self.candidate_locales Locale.candidates(type: :cldr).join(',') end + def self.clear +Locale.clear + end + def self.locales explicit = Dir.glob(File::absolute_path('*/*.po', locales_path)).map do |x| File::basename(File::dirname(x)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata2017-01-06 20:41:05.0 +0100 +++ new/metadata2017-01-18 19:57:49.0 +0100 @@ -1,181 +1,181 @@ --- !ruby/object:Gem::Specification name: gettext-setup version: !ruby/object:Gem::Version - version: '0.11' + version: '0.12' platform: ruby authors: - Puppet -autorequire: +autorequire: bindir: bin cert_chain: [] -date: 2017-01-06 00:00:00.0 Z +date: 2017-01-18 00:00:00.0 Z dependencies: - !ruby/object:Gem::Dependency - name: gettext requirement: !ruby/object:Gem::Requirement requirements: -- - ">=" +- - '>=' - !ruby/object:Gem::Version version: 3.0.2 - type: :runtime + name: gettext prerelease: false + type: :runtime version_requirements: !ruby/object:Gem::Requirement requirements: -- - ">=" +- - '>=' - !ruby/object:Gem::Version version: 3.0.2 - !ruby/object:Gem::Dependency - name: fast_gettext requirement: !ruby/object:Gem::Requirement requirements: -- - "~>" +- - ~> - !ruby/object:Gem::Version version: 1.1.0 - type: :runtime + name: fast_gettext prerelease: false + type: :runtime version_requirements: !ruby/object:Gem::Requirement requirements: -- - "~>" +- - ~> - !ruby/object:Gem::Version version: 1.1.0 - !ruby/object:Gem::Dependency - name: locale requirement: !ruby/object:Gem::Requirement requirements: -- - ">=" +- - '>=' - !ruby/object:Gem::Version version: '0' - type: :runtime + name: locale prerelease: false + type: :runtime version_requirements: !ruby/object:Gem::Requirement requirements: -- - ">=" +- - '>=' - !ruby/object:Gem::Version version: '0' - !ruby/object:Gem::Dependency - name: bundler requirement: !ruby/object:Gem::Requirement requirements: -- - "~>" +- - ~> - !ruby/object:Gem::Version version: '1.3' - type: :development + name: bundler prerelease: false + type: :development version_requirements: !ruby/object:Gem::Requirement requirements: -- - "~>" +- - ~> -
commit rubygem-gettext-setup for openSUSE:Factory
Hello community, here is the log from the commit of package rubygem-gettext-setup for openSUSE:Factory checked in at 2016-10-10 16:23:32 Comparing /work/SRC/openSUSE:Factory/rubygem-gettext-setup (Old) and /work/SRC/openSUSE:Factory/.rubygem-gettext-setup.new (New) Package is "rubygem-gettext-setup" Changes: --- /work/SRC/openSUSE:Factory/rubygem-gettext-setup/rubygem-gettext-setup.changes 2016-09-21 18:47:05.0 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-gettext-setup.new/rubygem-gettext-setup.changes 2016-10-10 16:23:33.0 +0200 @@ -1,0 +2,6 @@ +Wed Sep 14 04:31:37 UTC 2016 - co...@suse.com + +- updated to version 0.7 + no changelog found + +--- Old: gettext-setup-0.6.gem New: gettext-setup-0.7.gem Other differences: -- ++ rubygem-gettext-setup.spec ++ --- /var/tmp/diff_new_pack.MBQnZW/_old 2016-10-10 16:23:38.0 +0200 +++ /var/tmp/diff_new_pack.MBQnZW/_new 2016-10-10 16:23:38.0 +0200 @@ -24,14 +24,14 @@ # Name: rubygem-gettext-setup -Version:0.6 +Version:0.7 Release:0 %define mod_name gettext-setup %define mod_full_name %{mod_name}-%{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: ruby-macros >= 5 -BuildRequires: %{ruby} BuildRequires: %{rubygem gem2rpm} +BuildRequires: %{ruby} +BuildRequires: ruby-macros >= 5 Url:https://github.com/puppetlabs/gettext-setup-gem Source: http://rubygems.org/gems/%{mod_full_name}.gem Source1:gem2rpm.yml ++ gettext-setup-0.6.gem -> gettext-setup-0.7.gem ++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gemfile new/Gemfile --- old/Gemfile 2016-08-07 18:15:51.0 +0200 +++ new/Gemfile 1970-01-01 01:00:00.0 +0100 @@ -1,4 +0,0 @@ -source 'https://rubygems.org' - -# Specify dependencies in gettext-setup.gemspec -gemspec diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gemfile.lock new/Gemfile.lock --- old/Gemfile.lock2016-08-07 18:15:51.0 +0200 +++ new/Gemfile.lock1970-01-01 01:00:00.0 +0100 @@ -1,68 +0,0 @@ -PATH - remote: . - specs: -gettext-setup (0.5) - fast_gettext (~> 1.1.0) - gettext (>= 3.0.2) - -GEM - remote: https://rubygems.org/ - specs: -addressable (2.4.0) -crack (0.4.2) - safe_yaml (~> 1.0.0) -diff-lcs (1.2.5) -docile (1.1.5) -fast_gettext (1.1.0) -gettext (3.2.2) - locale (>= 2.0.5) - text (>= 1.3.0) -json (1.8.3) -json (1.8.3-java) -locale (2.1.2) -rack (1.6.4) -rack-test (0.6.3) - rack (>= 1.0) -rake (10.4.2) -rspec (3.5.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) -rspec-core (3.5.1) - rspec-support (~> 3.5.0) -rspec-expectations (3.5.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) -rspec-mocks (3.5.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) -rspec-support (3.5.0) -safe_yaml (1.0.4) -simplecov (0.10.0) - docile (~> 1.1.0) - json (~> 1.8) - simplecov-html (~> 0.10.0) -simplecov-html (0.10.0) -text (1.3.1) -webmock (1.20.4) - addressable (>= 2.3.6) - crack (>= 0.3.2) - -PLATFORMS - java - ruby - -DEPENDENCIES - bundler (~> 1.3) - gettext-setup! - rack-test - rake - rspec (~> 3.1) - rspec-core (~> 3.1) - rspec-expectations (~> 3.1) - rspec-mocks (~> 3.1) - simplecov - webmock - -BUNDLED WITH - 1.12.5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile new/Rakefile --- old/Rakefile2016-08-07 18:15:51.0 +0200 +++ new/Rakefile1970-01-01 01:00:00.0 +0100 @@ -1,37 +0,0 @@ -require 'bundler/setup' -require 'rake' - -require_relative './lib/gettext-setup/gettext_setup.rb' - -import 'lib/tasks/gettext.rake' - -namespace :bundler do - task :setup do -require 'bundler/setup' - end -end - -desc "Update i18n POT translations" -task :"spec-regen" do - require 'rake' - GettextSetup.initialize(File.absolute_path(File.join('spec', 'fixtures', 'locales'), File.dirname(__FILE__))) - Dir.chdir('spec/fixtures') - Rake.application['gettext:pot'].invoke - # No use in running these without Transifex integration to actually translate - # strings. - # Rake.application['gettext:po'].invoke('de') -end - -if defined?(RSpec::Core::RakeTask) - namespace :spec do -require 'rspec/core' -require 'rspec/core/rake_task' -puts 'running' - -desc 'Run all specs.' -RSpec::Core::RakeTask.new(:all