This repository has been archived by the owner. It is now read-only.
Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
71 additions
and 147 deletions.
- +14 −7 fastlane/Fastfile
- +57 −0 fastlane/actions/import_cliqz_localizations.rb
- +0 −73 fastlane/actions/import_localizations.rb
- +0 −67 shipping_locales.txt
| @@ -0,0 +1,57 @@ | ||
| module Fastlane | ||
| module Actions | ||
| OUTER_CONST = 99 | ||
| SUPPORTED_LANGUAGES = ["de", "es", "fr", "hu", "it", "ja", "ko", "nl", "pl", "pt-BR", "ru", "zh-CN", "zh-TW"] | ||
|
|
||
| class ImportCliqzLocalizationsAction < Action | ||
|
|
||
| def self.run(params) | ||
| UI.message "Parameter cliqz l10n Folder: #{params[:l10n_folder]}" | ||
|
|
||
| #import Cliqz localized strings | ||
| self.import_localization(params[:l10n_folder], "cliqz-ios.xliff") | ||
| end | ||
|
|
||
| def self.import_localization(directory, xliff_name) | ||
| command_line = "" | ||
| for language in SUPPORTED_LANGUAGES do | ||
| command_line = "xcodebuild -importLocalizations -localizationPath #{directory}/#{language}/#{xliff_name} -project Client.xcodeproj" | ||
| UI.message("import xliff file at #{directory}/#{language}/#{xliff_name}") | ||
| Actions.sh(command_line) | ||
| end | ||
| end | ||
|
|
||
| ##################################################### | ||
| # @!group Documentation | ||
| ##################################################### | ||
|
|
||
| def self.description | ||
| "Import localized constants from both Firefox and Cliqz xliff files" | ||
| end | ||
|
|
||
| def self.details | ||
| "" | ||
| end | ||
|
|
||
| def self.available_options | ||
| [ | ||
| FastlaneCore::ConfigItem.new(key: :l10n_folder, | ||
| env_name: "FL_IMPORT_BUILD_TOOLS_CLIQZ_L10N_FOLDER", # The name of the environment variable | ||
| description: "path to get CLiqz locatlization xliff files", # a short description of this parameter | ||
| verify_block: proc do |value| | ||
| raise "No Cliqz l10 folder for xliff files given, pass using `l10n_folder: 'path'`".red unless (value and not value.empty?) | ||
| # raise "Couldn't find file at path '#{value}'".red unless File.exist?(value) | ||
| end) | ||
| ] | ||
| end | ||
|
|
||
| def self.authors | ||
| ["mahmoud@cliqz.com"] | ||
| end | ||
|
|
||
| def self.is_supported?(platform) | ||
| platform == :ios | ||
| end | ||
| end | ||
| end | ||
| end |
| @@ -1,81 +1,14 @@ | ||
| af | ||
| an | ||
| ar | ||
| ast | ||
| az | ||
| bg | ||
| bn | ||
| br | ||
| bs | ||
| ca | ||
| cs | ||
| cy | ||
| da | ||
| de | ||
| dsb | ||
| el | ||
| en-GB | ||
| en-US | ||
| eo | ||
| es | ||
| es-AR | ||
| es-CL | ||
| es-MX | ||
| eu | ||
| fa | ||
| fr | ||
| ga-IE | ||
| gd | ||
| gl | ||
| he | ||
| hi-IN | ||
| hr | ||
| hsb | ||
| hu | ||
| hy-AM | ||
| ia | ||
| id | ||
| is | ||
| it | ||
| ja | ||
| ka | ||
| kab | ||
| kk | ||
| km | ||
| kn | ||
| ko | ||
| lo | ||
| lt | ||
| lv | ||
| ml | ||
| ms | ||
| my | ||
| nb-NO | ||
| ne-NP | ||
| nl | ||
| nn-NO | ||
| oc | ||
| or | ||
| pa-IN | ||
| pl | ||
| pt-BR | ||
| pt-PT | ||
| rm | ||
| ro | ||
| ru | ||
| ses | ||
| si | ||
| sk | ||
| sl | ||
| sq | ||
| sv-SE | ||
| ta | ||
| te | ||
| th | ||
| tl | ||
| tr | ||
| uk | ||
| ur | ||
| uz | ||
| zh-CN | ||
| zh-TW |