Skip to content

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

Send modules/**/en.seeders.yml to crowdin

Christophe Bliard63d3d127dc4f
diff --git a/script/i18n/generate_seeders_i18n_source_file b/script/i18n/generate_seeders_i18n_source_file
index 65b1519e599..6658fd1e9c6 100755
--- a/script/i18n/generate_seeders_i18n_source_file
+++ b/script/i18n/generate_seeders_i18n_source_file
@@ -63,6 +63,7 @@ class GenerateSeederSourceTranslationFiles
.each do |dir, seed_files|
create_crowdin_source_file(dir, seed_files)
end
+ create_additional_dummy_crowdin_source_file
puts "Done"
end
@@ -78,6 +79,24 @@ class GenerateSeederSourceTranslationFiles
end
end
+ def create_additional_dummy_crowdin_source_file
+ dummy_file = Rails.root.join('modules/boards/config/locales/en.seeders.yml')
+ content = <<~CONTENT
+ #{comment}
+ #
+ # This file is needed to prevent bug #48450: at least two 'en.seeders.yml' files
+ # located in the modules directories are needed to have crowdin cli correctly
+ # compute the path to the uploaded source file.
+ #
+ # This file does not contain any i18n strings.
+
+ en:
+ CONTENT
+ File.write(dummy_file, content)
+
+ puts "Generate additional dummy crowdin source file #{relative_path(dummy_file.to_s)}"
+ end
+
def source_file_path(seed_file_path)
base_path = seed_file_path
loop do