Skip to content

Commit

Permalink
update pot creation
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaltom committed Jan 22, 2013
1 parent b7d15d1 commit 6d74e97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -16,3 +16,4 @@ public/assets
tmp/sass-cache
config/options.yml
.bundle
locale
9 changes: 3 additions & 6 deletions lib/tasks/gettext.rake
Expand Up @@ -4,7 +4,6 @@

desc "Import clean (non-fuzzy) .mo files from lcn checkout"
task :makemo do
require 'gettext/utils'
raise "ERROR: $MY_LCN_CHECKOUT should point to your checkout of https://svn.opensuse.org/svn/opensuse-i18n/trunk/lcn" if ENV["MY_LCN_CHECKOUT"].nil?
system("cd $MY_LCN_CHECKOUT && svn up")
files = Dir.glob(ENV["MY_LCN_CHECKOUT"] + "/*/po/software-opensuse-org*.po")
Expand All @@ -28,14 +27,12 @@ task :makemo do
}
end


desc "Update pot/po files in lcn checkout to match new version."
task :updatepo do
require 'gettext/utils'
raise "ERROR: $MY_LCN_CHECKOUT should point to your checkout of https://svn.opensuse.org/svn/opensuse-i18n/trunk/lcn" if ENV["MY_LCN_CHECKOUT"].nil?
files = Dir.glob("{app,lib}/**/*.{rb,rhtml,erb}")
GetText.rgettext(files, "tmp.pot")
Rake::Task['gettext:find'].invoke
system("cd $MY_LCN_CHECKOUT && svn up")
system("msgmerge -o $MY_LCN_CHECKOUT/50-pot/software-opensuse-org.pot $MY_LCN_CHECKOUT/50-pot/software-opensuse-org.pot tmp.pot")
FileUtils.rm_f "tmp.pot"
system("msgmerge -o $MY_LCN_CHECKOUT/50-pot/software-opensuse-org.pot $MY_LCN_CHECKOUT/50-pot/software-opensuse-org.pot locale/software.pot")
system("cd $MY_LCN_CHECKOUT && sh ./50-tools/lcn-merge.sh -p software-opensuse-org.pot -s -n")
end

0 comments on commit 6d74e97

Please sign in to comment.