Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-localization-strings

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-localization-strings - npm Package Compare versions

Comparing version 4.1.3 to 4.2.0

78

package.json
{
"name": "cordova-plugin-localization-strings",
"version": "4.1.3",
"description": "Cordova Plugin for handling localization strings on InfoPlist.strings and Localizable.strings on iOS, strings.xml on Android",
"keywords": [
"ecosystem:cordova",
"cordova-android",
"cordova-ios",
"i18n",
"internationalization",
"l10n",
"localization",
"strings.xml",
"InfoPlist.strings",
"Localizable.strings"
],
"homepage": "https://github.com/kelvinhokk/cordova-plugin-localization-strings.git",
"bugs": {
"url": "https://github.com/kelvinhokk/cordova-plugin-localization-strings.git/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/kelvinhokk/cordova-plugin-localization-strings.git"
},
"license": "MIT",
"dependencies": {
"glob": "^7.2.0",
"mkdirp": "^1.0.4",
"underscore": "^1.13.2",
"xcode": "^3.0.1",
"xml2js": "^0.4.23"
},
"engines": {
"cordovaDependencies": {
"4.0.0": {
"cordova": ">=6.1.0"
}
},
"node": ">=10"
}
"name": "cordova-plugin-localization-strings",
"version": "4.2.0",
"description": "Cordova Plugin for handling localization strings on InfoPlist.strings and Localizable.strings on iOS, strings.xml on Android",
"keywords": [
"ecosystem:cordova",
"cordova-android",
"cordova-ios",
"i18n",
"internationalization",
"l10n",
"localization",
"strings.xml",
"InfoPlist.strings",
"Localizable.strings"
],
"homepage": "https://github.com/kelvinhokk/cordova-plugin-localization-strings.git",
"bugs": {
"url": "https://github.com/kelvinhokk/cordova-plugin-localization-strings.git/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/kelvinhokk/cordova-plugin-localization-strings.git"
},
"license": "MIT",
"dependencies": {
"glob": "^7.2.0",
"mkdirp": "^1.0.4",
"underscore": "^1.13.2",
"xcode": "^3.0.1",
"xml2js": "^0.4.23"
},
"engines": {
"cordovaDependencies": {
"4.0.0": {
"cordova": ">=6.1.0"
}
},
"node": ">=10"
}
}

@@ -166,2 +166,20 @@ # Cordova Localization Strings Plugin

### iOS Settings localizations
This plugin can localizae iOS Settings bundles.
Example usage:
```json
{
"settings_ios": {
"Root": {
"App version": "App version"
}
}
}
```
In the example shown, it would create a file such as "platforms/ios/<app name>/Resources/Settings.bundle/<language>.lproj/Root.strings" with
the expected localizations for that language.
### Push notifications messages

@@ -168,0 +186,0 @@

@@ -48,4 +48,4 @@ var fs = require('fs');

function writeStringFile(plistStringJsonObj, lang, fileName) {
var lProjPath = getTargetIosDir() + '/Resources/' + lang + '.lproj';
function writeStringFile(plistStringJsonObj, lang, fileName, bundle) {
var lProjPath = getTargetIosDir() + "/Resources/" + (bundle ? bundle + "/" : "") + lang + ".lproj";
mkdirp(lProjPath).then(function () {

@@ -84,2 +84,3 @@ var stringToWrite = jsonToDotStrings(plistStringJsonObj);

var localizableStringsPaths = [];
var settingsBundlePaths = [];

@@ -128,2 +129,18 @@ return getTargetLang(context).then(function (languages) {

}
// to create Settings.bundle localizations
if (_.has(langJson, "settings_ios")) {
var localizableSettingsJson = langJson.settings_ios;
if (!_.isEmpty(localizableSettingsJson)) {
_.each(localizableSettingsJson, function (value, key) {
var settingsFileName = key + ".strings";
var localizableSettingsStringsRoot = value;
if (!_.isEmpty(localizableSettingsStringsRoot)) {
writeStringFile(localizableSettingsStringsRoot, localeLang, settingsFileName, "Settings.bundle");
settingsBundlePaths.push("Settings.bundle" + localeLang + ".lproj/" + settingsFileName);
}
});
}
}
});

@@ -130,0 +147,0 @@ });

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc