don't automatically include en_US in the docs list for tags and branches
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1071907
This commit is contained in:
parent
a0f8b6266b
commit
3239b78443
|
@ -50,7 +50,7 @@ public
|
||||||
checkoutSource
|
checkoutSource
|
||||||
translations = checkoutTranslations(skipBelow) if getTranslations
|
translations = checkoutTranslations(skipBelow) if getTranslations
|
||||||
docs = checkoutDocumentation if getDocs
|
docs = checkoutDocumentation if getDocs
|
||||||
|
|
||||||
if createTag
|
if createTag
|
||||||
Dir.chdir "#{@workingDir}/#{@outputDir}"
|
Dir.chdir "#{@workingDir}/#{@outputDir}"
|
||||||
tagger = Tagger.new(@checkoutFrom, @checkoutTag, @app, @protocol, @user, @version)
|
tagger = Tagger.new(@checkoutFrom, @checkoutTag, @app, @protocol, @user, @version)
|
||||||
|
@ -60,13 +60,13 @@ public
|
||||||
end
|
end
|
||||||
|
|
||||||
@app.applyFixes(@workingDir, @outputDir) if applyFixes
|
@app.applyFixes(@workingDir, @outputDir) if applyFixes
|
||||||
|
|
||||||
self.createTarball if createTarball
|
self.createTarball if createTarball
|
||||||
end
|
end
|
||||||
|
|
||||||
def checkoutSource
|
def checkoutSource
|
||||||
Dir.chdir @workingDir
|
Dir.chdir @workingDir
|
||||||
|
|
||||||
repository = ReleaseBuilder.repositoryRoot(@protocol, @user) + ReleaseBuilder.repositoryPath('src', @app, @checkoutFrom, @checkoutTag)
|
repository = ReleaseBuilder.repositoryRoot(@protocol, @user) + ReleaseBuilder.repositoryPath('src', @app, @checkoutFrom, @checkoutTag)
|
||||||
`svn co #{repository} #{@outputDir}`
|
`svn co #{repository} #{@outputDir}`
|
||||||
end
|
end
|
||||||
|
@ -89,16 +89,16 @@ END_OF_TEXT
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
def checkoutTranslations(skipBelow)
|
def checkoutTranslations(skipBelow)
|
||||||
Dir.chdir "#{@workingDir}/#{@outputDir}"
|
Dir.chdir "#{@workingDir}/#{@outputDir}"
|
||||||
|
|
||||||
FileUtils.rm_rf 'l10n'
|
FileUtils.rm_rf 'l10n'
|
||||||
FileUtils.rm_rf 'po'
|
FileUtils.rm_rf 'po'
|
||||||
|
|
||||||
repository = ReleaseBuilder.repositoryRoot(@protocol, @user) + ReleaseBuilder.repositoryPath('i18n', @app, @checkoutFrom, @checkoutTag)
|
repository = ReleaseBuilder.repositoryRoot(@protocol, @user) + ReleaseBuilder.repositoryPath('i18n', @app, @checkoutFrom, @checkoutTag)
|
||||||
|
|
||||||
translations = []
|
translations = []
|
||||||
|
@ -116,12 +116,12 @@ END_OF_TEXT
|
||||||
`svn co #{repository}/#{lang}/messages/#{@app.component}-#{@app.section} l10n >/dev/null 2>&1`
|
`svn co #{repository}/#{lang}/messages/#{@app.component}-#{@app.section} l10n >/dev/null 2>&1`
|
||||||
next unless FileTest.exists? "l10n/#{@app.name}.po"
|
next unless FileTest.exists? "l10n/#{@app.name}.po"
|
||||||
next unless checkTranslation(lang, "l10n", skipBelow)
|
next unless checkTranslation(lang, "l10n", skipBelow)
|
||||||
|
|
||||||
puts "Adding translations for #{lang}..."
|
puts "Adding translations for #{lang}..."
|
||||||
|
|
||||||
dest = "po/#{lang}"
|
dest = "po/#{lang}"
|
||||||
Dir.mkdir dest
|
Dir.mkdir dest
|
||||||
|
|
||||||
FileUtils.mv("l10n/#{@app.name}.po", dest)
|
FileUtils.mv("l10n/#{@app.name}.po", dest)
|
||||||
FileUtils.mv('l10n/.svn', dest)
|
FileUtils.mv('l10n/.svn', dest)
|
||||||
|
|
||||||
|
@ -135,9 +135,9 @@ END_OF_TEXT
|
||||||
Dir.entries('po').sort.each do |lang|
|
Dir.entries('po').sort.each do |lang|
|
||||||
next if lang == 'CMakeLists.txt' or lang == '.' or lang == '..' or lang == '.svn'
|
next if lang == 'CMakeLists.txt' or lang == '.' or lang == '..' or lang == '.svn'
|
||||||
next unless checkTranslation(lang, "po/#{lang}", skipBelow)
|
next unless checkTranslation(lang, "po/#{lang}", skipBelow)
|
||||||
|
|
||||||
createCmakeListsTranslations(lang)
|
createCmakeListsTranslations(lang)
|
||||||
|
|
||||||
translations << lang
|
translations << lang
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -160,7 +160,7 @@ END_OF_TEXT
|
||||||
|
|
||||||
translations.each { |lang| f.print "add_subdirectory(#{lang})\n" }
|
translations.each { |lang| f.print "add_subdirectory(#{lang})\n" }
|
||||||
end
|
end
|
||||||
|
|
||||||
File.open('CMakeLists.txt', File::APPEND | File::RDWR) do |f|
|
File.open('CMakeLists.txt', File::APPEND | File::RDWR) do |f|
|
||||||
f.print <<END_OF_TEXT
|
f.print <<END_OF_TEXT
|
||||||
include(MacroOptionalAddSubdirectory)
|
include(MacroOptionalAddSubdirectory)
|
||||||
|
@ -183,11 +183,11 @@ END_OF_TEXT
|
||||||
f << "kde4_create_handbook(index.docbook INSTALL_DESTINATION \${HTML_INSTALL_DIR}/#{lang}/ SUBDIR #{@app.name})\n"
|
f << "kde4_create_handbook(index.docbook INSTALL_DESTINATION \${HTML_INSTALL_DIR}/#{lang}/ SUBDIR #{@app.name})\n"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def checkoutDocumentation
|
def checkoutDocumentation
|
||||||
Dir.chdir "#{@workingDir}/#{@outputDir}"
|
Dir.chdir "#{@workingDir}/#{@outputDir}"
|
||||||
|
|
||||||
docs = [ 'en_US' ]
|
docs = [ ]
|
||||||
repository = ReleaseBuilder.repositoryRoot(@protocol, @user) + ReleaseBuilder.repositoryPath('doc', @app, @checkoutFrom, @checkoutTag)
|
repository = ReleaseBuilder.repositoryRoot(@protocol, @user) + ReleaseBuilder.repositoryPath('doc', @app, @checkoutFrom, @checkoutTag)
|
||||||
|
|
||||||
if @checkoutFrom == 'trunk'
|
if @checkoutFrom == 'trunk'
|
||||||
|
@ -202,10 +202,11 @@ END_OF_TEXT
|
||||||
end
|
end
|
||||||
|
|
||||||
createCmakeListsDoc("en_US")
|
createCmakeListsDoc("en_US")
|
||||||
|
docs << 'en_US'
|
||||||
|
|
||||||
# now, the rest of the docs are localized, so reside somewhere else
|
# now, the rest of the docs are localized, so reside somewhere else
|
||||||
subdirs = `svn cat #{repository}/subdirs 2>/dev/null`.chomp!
|
subdirs = `svn cat #{repository}/subdirs 2>/dev/null`.chomp!
|
||||||
|
|
||||||
subdirs.each do |lang|
|
subdirs.each do |lang|
|
||||||
lang.chomp!
|
lang.chomp!
|
||||||
|
|
||||||
|
@ -232,7 +233,7 @@ END_OF_TEXT
|
||||||
docs << lang
|
docs << lang
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
File.open('doc/CMakeLists.txt', File::CREAT | File::RDWR | File::TRUNC) do |f|
|
File.open('doc/CMakeLists.txt', File::CREAT | File::RDWR | File::TRUNC) do |f|
|
||||||
docs.each { |lang| f << "add_subdirectory(#{lang})\n" }
|
docs.each { |lang| f << "add_subdirectory(#{lang})\n" }
|
||||||
end
|
end
|
||||||
|
@ -249,15 +250,15 @@ END_OF_TEXT
|
||||||
|
|
||||||
def createTarball
|
def createTarball
|
||||||
Dir.chdir @workingDir
|
Dir.chdir @workingDir
|
||||||
|
|
||||||
tarBzFileName = "#{@outputDir}.tar.bz2"
|
tarBzFileName = "#{@outputDir}.tar.bz2"
|
||||||
tarGzFileName = "#{@outputDir}.tar.gz"
|
tarGzFileName = "#{@outputDir}.tar.gz"
|
||||||
|
|
||||||
`find #{@outputDir} -name .svn | xargs rm -rf`
|
`find #{@outputDir} -name .svn | xargs rm -rf`
|
||||||
`tar cfj #{tarBzFileName} #{@outputDir}`
|
`tar cfj #{tarBzFileName} #{@outputDir}`
|
||||||
`tar cfz #{tarGzFileName} #{@outputDir}`
|
`tar cfz #{tarGzFileName} #{@outputDir}`
|
||||||
`rm -rf #{@outputDir}`
|
`rm -rf #{@outputDir}`
|
||||||
|
|
||||||
puts "bz2 MD5: " + `md5sum #{tarBzFileName}`.split[0]
|
puts "bz2 MD5: " + `md5sum #{tarBzFileName}`.split[0]
|
||||||
puts "bz2 SHA1: " + `sha1sum #{tarBzFileName}`.split[0]
|
puts "bz2 SHA1: " + `sha1sum #{tarBzFileName}`.split[0]
|
||||||
|
|
||||||
|
@ -272,12 +273,12 @@ END_OF_TEXT
|
||||||
else
|
else
|
||||||
user += "@"
|
user += "@"
|
||||||
end
|
end
|
||||||
|
|
||||||
return "#{protocol}://#{user}svn.kde.org/home/kde/"
|
return "#{protocol}://#{user}svn.kde.org/home/kde/"
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.repositoryPath(type, app, checkoutFrom, tag)
|
def self.repositoryPath(type, app, checkoutFrom, tag)
|
||||||
|
|
||||||
if type == 'src'
|
if type == 'src'
|
||||||
|
|
||||||
rval = case checkoutFrom
|
rval = case checkoutFrom
|
||||||
|
@ -295,7 +296,7 @@ END_OF_TEXT
|
||||||
when 'tags' then "tags/#{app.name}/#{tag}/po"
|
when 'tags' then "tags/#{app.name}/#{tag}/po"
|
||||||
else "### invalid checkout source: #{checkoutFrom} ###"
|
else "### invalid checkout source: #{checkoutFrom} ###"
|
||||||
end
|
end
|
||||||
|
|
||||||
elsif type == 'doc'
|
elsif type == 'doc'
|
||||||
|
|
||||||
rval = case checkoutFrom
|
rval = case checkoutFrom
|
||||||
|
|
Loading…
Reference in New Issue