DEV: Switch from Transifex to Crowdin
diff --git a/.tx/config b/.tx/config
deleted file mode 100644
index 9163537..0000000
--- a/.tx/config
+++ /dev/null
@@ -1,99 +0,0 @@
-[main]
-host = https://www.transifex.com
-lang_map = el_GR: el, es_ES: es, fr_FR: fr, hu_HU: hu, ko_KR: ko, pt_PT: pt, sk_SK: sk, vi_VN: vi
-
-[discourse-org.core-client-yml]
-file_filter = config/locales/client.<lang>.yml
-source_file = config/locales/client.en.yml
-source_lang = en
-type = YML
-
-[discourse-org.core-server-yml]
-file_filter = config/locales/server.<lang>.yml
-source_file = config/locales/server.en.yml
-source_lang = en
-type = YML
-
-[discourse-org.pollclientenyml]
-file_filter = plugins/poll/config/locales/client.<lang>.yml
-source_file = plugins/poll/config/locales/client.en.yml
-source_lang = en
-type = YML
-
-[discourse-org.pollserverenyml]
-file_filter = plugins/poll/config/locales/server.<lang>.yml
-source_file = plugins/poll/config/locales/server.en.yml
-source_lang = en
-type = YML
-
-[discourse-org.narrativeclientenyml]
-file_filter = plugins/discourse-narrative-bot/config/locales/client.<lang>.yml
-source_file = plugins/discourse-narrative-bot/config/locales/client.en.yml
-source_lang = en
-type = YML
-
-[discourse-org.narrativeserverenyml]
-file_filter = plugins/discourse-narrative-bot/config/locales/server.<lang>.yml
-source_file = plugins/discourse-narrative-bot/config/locales/server.en.yml
-source_lang = en
-type = YML
-
-[discourse-org.discourse-presenceclientenyml]
-file_filter = plugins/discourse-presence/config/locales/client.<lang>.yml
-source_file = plugins/discourse-presence/config/locales/client.en.yml
-source_lang = en
-type = YML
-
-[discourse-org.discourse-presenceserverenyml]
-file_filter = plugins/discourse-presence/config/locales/server.<lang>.yml
-source_file = plugins/discourse-presence/config/locales/server.en.yml
-source_lang = en
-type = YML
-
-[discourse-org.coreplugindetailsclientyml]
-file_filter = plugins/discourse-details/config/locales/client.<lang>.yml
-source_file = plugins/discourse-details/config/locales/client.en.yml
-source_lang = en
-type = YML
-
-[discourse-org.coreplugindetailsserveryml]
-file_filter = plugins/discourse-details/config/locales/server.<lang>.yml
-source_file = plugins/discourse-details/config/locales/server.en.yml
-source_lang = en
-type = YML
-
-[discourse-org.core-plugin-local-dates-client-yml]
-file_filter = plugins/discourse-local-dates/config/locales/client.<lang>.yml
-source_file = plugins/discourse-local-dates/config/locales/client.en.yml
-source_lang = en
-type = YML
-
-[discourse-org.core-plugin-local-dates-server-yml]
-file_filter = plugins/discourse-local-dates/config/locales/server.<lang>.yml
-source_file = plugins/discourse-local-dates/config/locales/server.en.yml
-source_lang = en
-type = YML
-
-[discourse-org.403html]
-file_filter = public/403.<lang>.html
-source_file = public/403.html
-source_lang = en
-type = HTML
-
-[discourse-org.422html]
-file_filter = public/422.<lang>.html
-source_file = public/422.html
-source_lang = en
-type = HTML
-
-[discourse-org.500html]
-file_filter = public/500.<lang>.html
-source_file = public/500.html
-source_lang = en
-type = HTML
-
-[discourse-org.503html]
-file_filter = public/503.<lang>.html
-source_file = public/503.html
-source_lang = en
-type = HTML
diff --git a/crowdin.yml b/crowdin.yml
deleted file mode 100644
index 49c948f..0000000
--- a/crowdin.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-files:
- - source: /**/config/locales/server.en.yml
- translation: /%original_path%/server.%locale_with_underscore%.yml
- - source: /**/config/locales/client.en.yml
- translation: /%original_path%/client.%locale_with_underscore%.yml
- - source: '/public/*[0-9].html'
- translation: /%original_path%/%file_name%.%locale_with_underscore%.%file_extension%
diff --git a/script/plugin-translations.rb b/script/plugin-translations.rb
deleted file mode 100644
index 87bf4e8..0000000
--- a/script/plugin-translations.rb
+++ /dev/null
@@ -1,91 +0,0 @@
-# frozen_string_literal: true
-
-if ARGV.empty?
- puts 'Usage: ', ''
- puts ' ruby plugin-translations.rb <plugins_base_dir>'
- puts ' ruby plugin-translations.rb <plugins_base_dir> push (to git push)'
- exit 1
-end
-
-require 'bundler'
-
-class PluginTxUpdater
-
- attr_reader :failed
-
- PLUGINS = [
- 'discourse-adplugin',
- 'discourse-akismet',
- 'discourse-assign',
- 'discourse-cakeday',
- 'discourse-canned-replies',
- 'discourse-characters-required',
- 'discourse-chat-integration',
- 'discourse-checklist',
- 'discourse-data-explorer',
- 'discourse-math',
- 'discourse-oauth2-basic',
- 'discourse-patreon',
- 'discourse-saved-searches',
- 'discourse-solved',
- 'discourse-user-notes',
- 'discourse-voting'
- ]
-
- def initialize(base_dir, push)
- @push = !!push
- @base_dir = base_dir
- @failed = []
- end
-
- def perform
- PLUGINS.each do |plugin_name|
- plugin_dir = File.join(@base_dir, plugin_name)
- Bundler.with_clean_env do
- Dir.chdir(plugin_dir) do # rubocop:disable Discourse/NoChdir because this is not part of the app
- puts '', plugin_dir, '-' * 80, ''
-
- begin
- system_cmd('git pull')
- system_cmd('bundle update translations-manager')
- system_cmd('bundle exec bin/pull_translations.rb')
- system_cmd('git add config/locales/*')
- system_cmd('git add Gemfile.lock') rescue true # might be gitignored
- system_cmd('git add .tx/config') rescue true
- system_cmd('git commit -m "Update translations"')
- system_cmd('git push origin master') if @push
- rescue => e
- puts "Failed for #{plugin_name}. Skipping...", ''
- @failed << plugin_name
- end
- end
- end
- end
- end
-
- def system_cmd(s)
- rc = system(s)
- raise RuntimeError.new($?) if rc != true
- end
-end
-
-base_dir = File.expand_path(ARGV[0])
-
-unless File.exists?(base_dir)
- puts '', "Dir '#{base_dir}' doesn't exist."
- exit 1
-end
-
-updates = PluginTxUpdater.new(base_dir, ARGV[1]&.downcase == 'push')
-updates.perform
-
-if updates.failed.empty?
- puts '', "All plugins updated successfully!", ''
-else
- if updates.failed.size < PluginTxUpdater::PLUGINS.size
- puts '', "These plugins updated successfully: ", ''
- puts PluginTxUpdater::PLUGINS - updates.failed
- end
- puts '', "Errors were encountered while updating these plugins:", ''
- puts updates.failed
-end
diff --git a/script/pull_translations.rb b/script/pull_translations.rb
deleted file mode 100755
index 921da27..0000000
--- a/script/pull_translations.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: true
-
-require 'bundler/inline'
-
-gemfile(true) do
- gem 'translations-manager', git: 'https://github.com/discourse/translations-manager.git'
-end
-
-require 'translations_manager'
-
-def expand_path(path)
- File.expand_path("../../#{path}", __FILE__)
-end
-
-def supported_locales
- Dir.glob(expand_path('config/locales/client.*.yml'))
- .map { |x| x.split('.')[-2] }
- .reject { |x| x.start_with?('en') }
- .sort - TranslationsManager::BROKEN_LOCALES
-end
-
-YML_DIRS = ['config/locales',
- 'plugins/poll/config/locales',
- 'plugins/discourse-details/config/locales',
- 'plugins/discourse-local-dates/config/locales',
- 'plugins/discourse-narrative-bot/config/locales',
- 'plugins/discourse-nginx-performance-report/config/locales',
- 'plugins/discourse-presence/config/locales'].map { |dir| expand_path(dir) }
-YML_FILE_PREFIXES = ['server', 'client']
-TX_CONFIG = expand_path('.tx/config')
-JS_LOCALE_DIR = expand_path('app/assets/javascripts/locales')
-
-if ARGV.empty? && TranslationsManager::SUPPORTED_LOCALES != supported_locales
- STDERR.puts <<~MESSAGE
-
- The supported locales are out of sync.
[... diff too long, it was truncated ...]
GitHub sha: 29788f2c