diff --git a/plugins/discourse-narrative-bot/config/locales/client.vi.yml b/plugins/discourse-narrative-bot/config/locales/client.vi.yml index 97b13f94972..fa809fe162c 100644 --- a/plugins/discourse-narrative-bot/config/locales/client.vi.yml +++ b/plugins/discourse-narrative-bot/config/locales/client.vi.yml @@ -5,4 +5,4 @@ # To work with us on translations, join this project: # https://www.transifex.com/projects/p/discourse-org/ -vi_VN: {} +vi: {} diff --git a/plugins/discourse-narrative-bot/config/locales/server.vi.yml b/plugins/discourse-narrative-bot/config/locales/server.vi.yml index 97b13f94972..fa809fe162c 100644 --- a/plugins/discourse-narrative-bot/config/locales/server.vi.yml +++ b/plugins/discourse-narrative-bot/config/locales/server.vi.yml @@ -5,4 +5,4 @@ # To work with us on translations, join this project: # https://www.transifex.com/projects/p/discourse-org/ -vi_VN: {} +vi: {} diff --git a/script/pull_translations.rb b/script/pull_translations.rb index a739b0da47f..e5e6dce8972 100644 --- a/script/pull_translations.rb +++ b/script/pull_translations.rb @@ -89,7 +89,7 @@ end # Add comments to the top of files and replace the language (first key in YAML file) def update_file_header(filename, language) lines = File.readlines(filename) - lines.collect! { |line| line =~ /^[a-z_]+:$/i ? "#{language}:" : line } + lines.collect! { |line| line.gsub!(/^[a-z_]+:( {})?$/i, "#{language}:\\1") || line } File.open(filename, 'w+') do |f| f.puts(YML_FILE_COMMENTS, '') unless lines[0][0] == '#'