mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-02-26 08:22:31 +00:00
update_translation.rb: normalize po file after copying it
This commit is contained in:
parent
40c34a15d0
commit
f22fc8b426
4
Rakefile
4
Rakefile
@ -31,9 +31,7 @@ require_relative "rake.d/config"
|
||||
|
||||
read_config
|
||||
|
||||
$verbose = ENV['V'].to_bool
|
||||
$action_width = 12
|
||||
|
||||
$verbose = ENV['V'].to_bool
|
||||
$build_system_modules = {}
|
||||
$have_gtest = (c(:GTEST_TYPE) == "system") || (c(:GTEST_TYPE) == "internal")
|
||||
$gtest_apps = []
|
||||
|
@ -5,6 +5,7 @@ require "fileutils"
|
||||
|
||||
$git_mutex = Mutex.new
|
||||
$message_mutex = Mutex.new
|
||||
$action_width = 12
|
||||
|
||||
def puts(message)
|
||||
$message_mutex.synchronize {
|
||||
|
@ -125,7 +125,7 @@ def write_po file_name, items
|
||||
end
|
||||
|
||||
def normalize_po file
|
||||
puts "NORMALIZE-PO #{file}"
|
||||
puts_action "NORMALIZE-PO", file
|
||||
write_po file, read_po(file)
|
||||
end
|
||||
|
||||
|
@ -3,11 +3,16 @@
|
||||
|
||||
require "fileutils"
|
||||
require "pathname"
|
||||
require "rake"
|
||||
require "shellwords"
|
||||
require "tmpdir"
|
||||
|
||||
$po_dir = File.absolute_path(File.dirname(__FILE__) + "/../../po")
|
||||
$man_po_dir = File.absolute_path(File.dirname(__FILE__) + "/../../doc/man/po4a/po")
|
||||
$mtx_dir = File.absolute_path(File.dirname(__FILE__) + "/../..")
|
||||
$po_dir = "#{$mtx_dir}/po"
|
||||
$man_po_dir = "#{$mtx_dir}doc/man/po4a/po"
|
||||
|
||||
require "#{$mtx_dir}/rake.d/helpers"
|
||||
require "#{$mtx_dir}/rake.d/po"
|
||||
|
||||
module AddPo
|
||||
def self.handle_po file_name
|
||||
@ -32,6 +37,8 @@ module AddPo
|
||||
File.chmod 0644, target
|
||||
|
||||
puts "#{file_name} → #{target}"
|
||||
|
||||
normalize_po target
|
||||
end
|
||||
|
||||
def self.unpack_p7z file_name
|
||||
@ -124,9 +131,4 @@ module AddPo
|
||||
end
|
||||
end
|
||||
|
||||
begin
|
||||
# Running under Rake?
|
||||
Rake
|
||||
rescue
|
||||
ARGV.each { |file_name| AddPo::add File.absolute_path(file_name) }
|
||||
end
|
||||
ARGV.each { |file_name| AddPo::add File.absolute_path(file_name) }
|
||||
|
Loading…
Reference in New Issue
Block a user