OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Fix translations overwritten by seeders translations
Christophe Bliardda773a124801
diff --git a/script/i18n/fix_crowdin_translation_filenames.rb b/script/i18n/fix_crowdin_translation_filenames.rbindex 9b4efb9ed27..a1c0d121cae 100644--- a/script/i18n/fix_crowdin_translation_filenames.rb+++ b/script/i18n/fix_crowdin_translation_filenames.rb@@ -1,10 +1,5 @@require 'fileutils'-def js_translation?(translation_file_path)- filename = File.basename translation_file_path.to_s- filename.match? /\Ajs-.+\z/-end-Dir.glob('**/config/locales/crowdin/*.yml').each do |crowdin_file|# Get the line that contains the first language keylanguage_key = nil@@ -26,7 +21,16 @@ Dir.glob('**/config/locales/crowdin/*.yml').each do |crowdin_file|language_key.delete!('"')# the files should be named like their translation-key- new_filename = "#{js_translation?(filename) ? 'js-' : ''}#{language_key}.yml"+ new_filename =+ case filename+ when /\Ajs-.+\z/+ "js-#{language_key}.yml"+ when /.+\.seeders\.yml\z/+ "#{language_key}.seeders.yml"+ else+ "#{language_key}.yml"+ end+directory = File.dirname(crowdin_file)new_filepath = File.join(directory, new_filename)