Skip to content

Commit

Permalink
chore(cordova/android): fix import_messages script for Android and …
Browse files Browse the repository at this point in the history
…move it to Node (#1674)

* Fix `import_messages` script for Android and move it to Node.

* Set encoding.

* Delete unused `validate_localized_keys` module.

* Escape XML characters.
  • Loading branch information
sbruens authored Jul 21, 2023
1 parent 317e8f6 commit c908e1a
Show file tree
Hide file tree
Showing 73 changed files with 823 additions and 537 deletions.
169 changes: 168 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@
"webpack-cli": "^4.4.0",
"webpack-dev-server": "^4.5.0",
"webpack-merge": "^5.8.0",
"webpack-shell-plugin-next": "^2.1.1"
"webpack-shell-plugin-next": "^2.1.1",
"xmlbuilder2": "^3.1.1"
},
"optionalDependencies": {
"ios-deploy": "^1.11.4"
Expand Down
24 changes: 24 additions & 0 deletions src/cordova/android/get_native_locale.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright 2023 The Outline Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

export const getNativeLocale = polymerLang => {
switch (polymerLang) {
case 'es-419':
return 'es';
case 'sr-Latn':
return 'b+sr+Latn';
default:
return polymerLang.replace('-', '-r');
}
};
44 changes: 0 additions & 44 deletions src/cordova/android/import_messages.action.sh

This file was deleted.

76 changes: 0 additions & 76 deletions src/cordova/android/import_messages.py

This file was deleted.

Loading

0 comments on commit c908e1a

Please sign in to comment.