Giter Site home page Giter Site logo

cordova-plugin-localization-strings's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cordova-plugin-localization-strings's Issues

Execution failed for task ':app:mergeDebugResources'.

trying to build for Android but this error occurs:

Execution failed for task ':app:mergeDebugResources'.
> /Users/francescopaiola/Desktop/Projects/PlanetProf/PlanetProf-App/platforms/android/app/src/main/res/values-it-IT: Error: Invalid resource directory name

Thanks in advance!

Allow use a diferent directory for the files.

What if someone have a i18n directory where store translations, and want use that directory for the localization string too.

I think, this plugin should allow users choose where store that files (optional of course).

[Question] Xcode needs to be configured separately?

Hello,

Is there an assumption that some of the Localization files need to be configured manually, other than what is mentioned in the Readme? Or additional Xcode configuration before or after this plugin is installed?

I'm getting an error on cordove platform add ios

screen shot 2017-04-11 at 4 53 03 pm

Thanks for any help.
-Andrew

projectFile import will break in cordova-ios@7

var projectFileApi = require(path.join(platformPath, '/cordova/lib/projectFile.js'));

This is more-or-less a heads up that this import will break as the CLI lib tools will no longer be copied to the project and instead will remain inside the node_modules.

cordova-ios@7 isn't released but it can be tested using the development version found in the master branch of cordova-ios repository.

Starting with cordova-ios@7, require('cordova-ios/lib/projectFile') should be a sufficient workaround (this will be a breaking change and won't work for cordova-ios@6 or earlier).

However, this plugin is accessing a private module, projectFile isn't part of the public API, so doing this is dangerous, as it could change in a breaking way without notice. So I'd also suggest creating a Feature Request explaining the reasoning for using this API and perhaps we can also look at exposing it in a proper way for cordova-ios@7 release.

Cannot find module 'xcode' on v2.0.0

This is the full error i'm getting (Cordova v6.3.0):

(node:31874) UnhandledPromiseRejectionWarning: Error: Cannot find module 'xcode'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at module.exports (/Users/{user}/fuse_helperapp/cordova/plugins/cordova-plugin-localization-strings/scripts/create_ios_strings.js:91:17)
at module.exports (/Users/{user}/fuse_helperapp/cordova/plugins/cordova-plugin-localization-strings/scripts/create_strings.js:11:23)
at runScriptViaModuleLoader (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:188:18)
at runScript (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:164:16)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:132:20
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
(node:31874) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:31874) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Anyone else having this issue? Anyone who knows what i'm doing wrong or if something is wrong on the plugins end?

What is the default language if there are 2 languages specified

Assume that I have 2 languages for localization, JA and EN, which one will be default if my device's language is another language, for example - VN, which file will be chosen for translated content? I tried and I get the result is En, but is that a guarantee behavior?

Invalid resource directory name

I'm trying to config NSCameraUsageDescription inside config_ios. The json name is zh-Hant-TW.json.

However, I'm getting

* What went wrong:
Execution failed for task ':mergeDebugResources'.
> xxxxxxxx/platforms/android/res/values-zh-Hant-TW: Error: Invalid resource directory name

Any clue?

Automatic tests

@fordkilleen

when I was updating this plugin I created a dummy cordova project.
something along the lines of:

cordova create test
cd test
cordova plugin add ../cordova-plugin-localization-strings
cordova platform add android
mkdir translations
cd translations
mkdir app
en.json

wrote

{
	"config_ios": {
		"NSCameraUsageDescription": "Take pictures",
		"CFBundleDisplayName": "Some App Name",
		"CFBundleName": "Some App Name"
	},
	"config_android": {
		"app_name": "Some App Name"
	},
	"app": {
		"HAVE_MAIL_TITLE": "You have mail.",
		"HAVE_MAIL_MSG": "%1$@ has you a message titled \\\"%2$@\\\"",
		"test": "test",
		"abc": "def",
		"mochi": "mochi",
	}
}
cordova prepare

and then verified that was properly written with

cat platforms/android/app/src/main/res/values/strings.xml

Dependencies

Don't we miss the iconv-lite and fs-extra dependency in the package.json?
I had to install them in order to make it work.

Support localising of config.xml permission strings

NSLocationWhenInUseUsageDescription
NSLocationAlwaysUsageDescription
NSCameraUsageDescription
etc

should also be localised.

So instead of automatic detecting of what needs to go into InfoPlist.strings I'd suggest to have 2 translation files for each language, one for config.json and one for app.json. Everything from config.json goes into InfoPlist.strings.

What do you think?

Force Android resConfigs

For Android, res files are written in the expected folders.

But testing if the app behaves as expected for the different cases of locale resolution, I understood this is not that easy.
Some good blog posts try to explain things a bit more than the official doc, like this one.

First setup is to define the resConfigs property in build.gradle !
And it seems necessary from the Android doc too:

To ensure that languages are resolved correctly, specify the languages your app supports
https://developer.android.com/guide/topics/resources/multilingual-support#specify-the-languages-your-app-supports

This plugin should push its known languages to this property?
Cordova project template for Android does not have it set, but if ever it should be added or replaced in the target build.gradle I think.


I may start work on this soon, like next week, if it's ok.

Or should I start a new cordova-plugin to add more defaults like this about locales? (to include this, apache/cordova-android#1396, apache/cordova-ios#1222, and more?)

creating localisation with "-" fails on android

Using example "pt-BR.json", during building it returns this error: "cordova/platforms/android/app/src/main/res/values-pt-BR: Error: Invalid resource directory name"

Cordova-Android: 8.1.0
cordova-plugin-localization-strings: 3.2.1

Platform specific localizations?

Not sure if I'm just being dumb and missing something but we need to support languages like Simplified/Traditional Chinese and I can't seem to find a way to make this work for both Android and iOS with the same file(s).

For example prior to using this I had for Android:

  • zh-rCN
  • zh-rHK
  • zh-rTW

and for iOS:

  • zh-Hans
  • zh-Hans-CN
  • zh-Hant
  • zh-Hant-TW

If I use one or the other one platform doesn't work, and putting them all will also throw errors as I don't see a way to exclude certain files from a specific platform. Any suggestions or help would be greatly appreciated!

Project revived!

Hi everyone.

After a long process I was able to contact Kelvin and be added as a collaborator.
Now I can maintain this project by accepting your PRs, etc.

I will start by accepting some of the easiest ones and make some progress...

Version 5.0.0 - 5.0.2 regex broken on Windows

Hi,

Today I noticed an issue where new builds were not getting the translations added to the strings.xml files and did some digging, finding it to be related to the regex and the updated glob dependency. Hope you don't mind I've put up a PR for this as otherwise the plugin does not work on Windows for versions 5.0.0 to 5.0.2.

Issue:
Since version 5.0.0 of this plugin, the regex used to get the language from the json files to then create the strings.xml files was not working. This was due to the update of the glob dependency (now 10.2.1) which has had some changes regarding forward and back slashes since the previously used version (7.2.0).

Example:
glob would return something like my-path\en.json
but the regex being used was /my-path\/(.*).json
Effectively meaning the regex was expecting a / but on Windows would get \ path separator.

Steps to reproduce:

  1. Start with a clean cordova repository, or clean out an existing one (remove platform and plugins folders).
  2. Run a cordova build which will create the Android platform folder and included resources
  3. You will see on versions 5.0.0 and 5.0.2 that the translations from your en.json, es.json, etc. never made it into the strings xml file or had folders created (eg. res/values-es/)

Fix:
This broken regex issue (which causes this plugin to not work at all on Windows) is easily resolved by using a newly added glob option posix: true, which forces it to return / delimited paths on Windows instead of \, which matches the expected regex already in the repo.

PR has been raised: #82

Ref: Lots of changes with slashes and separators in glob between 7.2.0 and 10.2.1
https://github.com/isaacs/node-glob/blob/main/changelog.md

npm audit failes with 5 vulnerabilities (4 low, 1 moderate)

This plugin references outdated libraries with vulnerabilities. They can be listeted with

npm audit cordova-plugin-localization-strings

which gives the audit report below. I'll have a look at it and try to update the references.

# npm audit report

xmldom  *
Severity: moderate
Misinterpretation of malicious XML input - https://github.com/advisories/GHSA-h6q6-9hqw-rwfv
Misinterpretation of malicious XML input - https://github.com/advisories/GHSA-5fg8-2547-mr8q
fix available via `npm audit fix --force`
Will install [email protected], which is a breaking change
node_modules/xmldom
  cordova-plugin-localization-strings  *
  Depends on vulnerable versions of xcode
  Depends on vulnerable versions of xmldom
  node_modules/cordova-plugin-localization-strings
  plist  0.3.2 - 3.0.1
  Depends on vulnerable versions of xmldom
  node_modules/simple-plist/node_modules/plist
    simple-plist  <=0.3.0
    Depends on vulnerable versions of plist
    node_modules/simple-plist
      xcode  0.8.3 - 1.1.0
      Depends on vulnerable versions of simple-plist
      node_modules/xcode

5 vulnerabilities (4 low, 1 moderate)

Not getting localized strings on iOS 13

Greetings.. I'm having some difficulty getting this plugin to play nicely on an iPad running iOS 13.2.3. For what it's worth, it is working exactly as expected on my Xiaomi phone running Android 9 though. The project itself is generated with Ionic 4, using Angular 8 for the UI side and Cordova 9 for native platform integration.

First off, just some context: I do not have access to a new enough Mac to build locally for iOS 13 (I've got a really old Mac Mini, but I can't upgrade iOS to run the latest Xcode release), so I'm building the ipa files in the cloud using Ionic Package.

To summarise, the app display name and usage descriptions are still those defined in my package.json, the development build does not use the strings defined in the localization files.


I added the plugin using ionic cordova plugin cordova-plugin-localization-strings, created the expected /translations/app/[locale].json files for English and German, and configured each one with only the following:

{
  "config_ios": {
    "NSBluetoothPeripheralUsageDescription": "Use Bluetooth description in English",
    "NSPhotoLibraryUsageDescription": "Read Photo Library description in English",
    "CFBundleDisplayName": "Name in English",
    "CFBundleName": "Name in English"
  },
  "config_android": {
    "app_name": "Name in English"
  }
}

Initially I had actually removed the BLUETOOTH_USAGE_DESCRIPTION and PHOTO_LIBRARY_USAGE_DESCRIPTION keys from my package.json, thinking that it would be "safer" to not have the build process set one string only to have it replaced afterwards. Then for testing, I re-added these permission descriptions to package.json with an extra note at the end to differentiate the sources, and running it on the iPad definitely doesn't use the strings defined in my localization files.

I went searching for information on Cordova Hooks support in Ionic Package (which is part of the AppFlow side of Ionic Pro), from which I discovered a plugin called ionic-package-hooks, but this was deprecated July last year with a message stating that "Ionic Pro lets you use any Cordova hooks you want".

Just for the sake of clarity, I don't get any errors in the build output, it appears to add the plugin and run the hooks as expected:

[06:29:53]: ▸ Discovered saved plugin "cordova-plugin-localization-strings". Adding it to the project
[06:29:54]: ▸ Installing "cordova-plugin-localization-strings" for ios
[06:29:54]: ▸ Adding cordova-plugin-localization-strings to package.json
[06:29:54]: ▸ new pbx project written with localization groups
[06:29:54]: ▸ /Users/ionic/builds/project-0/platforms/ios purged from project cache

Also, please note that this plugin is at the end of the Cordova plugins listed, so it's processed after all the others, which (as I understand) means if this changes the same thing as any other plugin before it, this should overwrite whatever was there.


Does anybody have a suggestion on what I can try here...?

[v1.1.0] Error: Cannot find module 'xcode'

Hi,
I use v1.1.0 of your plugin and try to build only for android.
When I run ionic cordova build android --prod --release, I got Error: Cannot find module 'xcode'
My OS is windows 10 and I only installed Android SDK.
I only have one translate json: 'zh-CN.json'

{
  "locale": {
    "android": ["zh-rCN"]
  },
  "config_android": {
    "app_name": "The App Name in Chinese"
  }
}

If missing config_android, then empty strings.xml will be created

Hello,

I found this with the latest release.

If the (say) fr.json has content:

{
  "app": {
    "aboutVersionCode": "Code version"
  },
  "locale": {
    "android": [
      "fr"
    ]
  }
}

Key point being, there is no "config_android" set, this strings.xml generated will be empty

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resources/>

Will follow up with a PR shortly

How use?

Sorry for my english.

After all in readme, how use in html ?

<div>{{HAVE_MAIL_TITLE}}</div>

CordovaError: Could not find *-Info.plist file, or config.xml file.

Hi, I encountered an issue with installing and got this message:

cordova plugin add https://github.com/kelvinhokk/cordova-plugin-localization-strings.git --fetch
Installing "cordova-plugin-localization-strings" for ios
Failed to install 'cordova-plugin-localization-strings': CordovaError: Could not find *-Info.plist file, or config.xml file.

But the file config.xml is in the root directory as usual.

Does anyone knows how to avoid this message ?

Thanks,

DR

Installing the latest version causes an error → EUNSUPPORTEDPROTOCOL

I get an error when I try to install the latest version 5.x.
Here are the logs :

npm i [email protected]
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: strip-ansi-cjs@npm:strip-ansi@^6.0.1 (node_modules/@isaacs/cliui/node_modules/strip-ansi-cjs):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unsupported URL Type "npm:": npm:strip-ansi@^6.0.1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: wrap-ansi-cjs@npm:wrap-ansi@^7.0.0 (node_modules/@isaacs/cliui/node_modules/wrap-ansi-cjs):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unsupported URL Type "npm:": npm:wrap-ansi@^7.0.0

npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "npm:": npm:string-width@^4.2.0

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/opi/.npm/_logs/2023-10-18T10_05_23_945Z-debug.log

My config and environment :

  • Mac OS Ventura 13.5
  • Node 8.9.4, npm 5.5.1

Unable to upgrade to node and npm version.
The only solution is to revert to version 4.x.
npm i cordova-plugin-localization-strings@^4.0

Plugin does not properly respect project file cache

Cordova caches previously read project files. So any changes made by this plugin are lost when another plugin also modifies the iOS project. As this plugin modifies the project in a non-standard manner.

To fix this, the project file has to be evicted from the cache after writing it. I'm still working on the details in our fork.

Small issue when parsing the app name on iOS

I just wanted to report this issue i was just hit by:

The script kept crashing cordova prepare and after some debugging i noticed that the ios script tried to write files to a folder named null instead of the project, in this line the script tries to parse the config xml with regexp and fails because i was using the short name support, ie. <name short="shortname">longer name with spaces and junk</name>

I worked around my issues and this is probably a bit of an edge case, maybe not enough of an issue to warrant a fix.

Plugin cannot find config.xml

I had a bug resulting in the following message when building/prepare the app:

Error: ENOENT: no such file or directory, open 'config.xml'

It appears that my old app doesn't have config.xml in the root folder but in the www, which is cordova-compatible:

For projects created with the Cordova CLI (described in The Command-Line Interface), this > file can be found in the top-level directory:

app/config.xml

Note that before version 3.3.1-0.2.0, the file existed at app/www/config.xml, and that having > it here is still supported.

It should be good to either support the two locations, or adding a line in the docs asking for having config.xml in the root.

Plugin not working on Release Build iOS

Hi
I want to do some localization for the CocoaKey: NSCameraUsageDescription.
Unfortunately, the plugin doesn't work when I make a Cordova Release Build.
What I use:
Cordova cli: 8.1.2
XCode: 10.2.1
Deployment Target: 10.1

When I build my app with the command:
cordova build
Everything works fine and when I open the xCode Workspace I see the Localizable.strings and the *.lproj Files are at the right place

But when I build my app like this:
cordova build ios --device --release --buildConfig="/path/to/xcodebuild.json"
the localization is not working.
The *.lproj Files are at the right place but when I open the xCode I don't see the Localizable.strings

my files look like this (example en.json):
{
"config_ios" : {
"NSCameraUsageDescription": "The application needs access to your camera so you can scan invoices and deliver them digitally to Simplex."
}
}

Thanks for your help.

AAPT: error: unescaped apostrophe in string

PATH/platforms/android/app/src/main/res/values/strings.xml:13:2-103: AAPT: error: unescaped apostrophe in string
    
PATH/platforms/android/app/src/main/res/values/strings.xml:13:2-103: AAPT: error: not a valid string.
    
PATH/platforms/android/app/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml:117: error: unescaped apostrophe in string
PATH/platforms/android/app/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml:117: error: not a valid string.

:app:mergeReleaseResources
Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
:app:mergeReleaseResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeReleaseResources'.
> Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
33 actionable tasks: 2 executed, 31 up-to-date
(node:22280) UnhandledPromiseRejectionWarning: Error: PATH/platforms/android/gradlew: Command failed with exit code 1 Error output:
PATH/platforms/android/app/src/main/res/values/strings.xml:13:2-103: AAPT: error: unescaped apostrophe in string
    
PATH/platforms/android/app/src/main/res/values/strings.xml:13:2-103: AAPT: error: not a valid string.
    
PATH/platforms/android/app/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml:117: error: unescaped apostrophe in string
PATH/platforms/android/app/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml:117: error: not a valid string.

AAPT complains about ' not being escaped...
aparently it was a change introduced recently...

I've solved this by adding this line:

val = val.replace(/\'/gi, "\\'");

after

val = val.replace(/\$@/gi, "$s");

on create_android_string.js (line 173)

I think there's more chars that need to be escaped, so this should be a function that escapes all chars required and return the "clean" value.

Possible VoltBuilder woes

I'm attempting to use this plugin for primarily localized permission messages, and it seems the right folders and files are generated for iOS but not for Android when I use VoltBuilder, and I can't figure out whether it's the plugin or VoltBuilder that makes the mistake. In the VoltBuilder log I see that values folders are generated but they don't exist in the APK.

This looks right:

Localization saved: /platforms/android/app/src/main/res/values-se/strings.xml
Localization saved: /platforms/android/app/src/main/res/values/strings.xml

But after that I see no mention of these folders or files, and there are no values folders under the res folder. English is the default locale.

In an IPA I see en.lproj and se.lproj in the app root (Payload/xxx.app folder).

I'm in contact with the VoltBuilder team if they need to change anything.

I can send a log if it helps.

Be able to specify different keys for iOS and Android

It would be great to be able to specify different keys for iOS and Android, in the "app" section of the json, not just in the config.

Reason for this is that iOS makes it very easy to not use proper keys, but just the entire string as key-to-be-localized, for example in phonegap-plugin-barcodescanner, they just use NSLocalizedString around a full sentence in English. phonegap/phonegap-plugin-barcodescanner#732 (comment)

I can get that to work in iOS with this plugin, but now my Android strings.xml files contain invalid characters.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resources>
	<string name="Access to the camera has been prohibited; please enable it in the Settings app to continue.">Er is geen toestemming om de camera te gebruiken; geef deze toestemming in de Instellingen app om door te gaan.</string>
</resources>

Use this plugin to localize html files?

Can this plugin be used to localize "strings" in html files? If yes, how should it be done?
For example: i have an app and want to let the user change the language in the app.

I've tried something like this, but it doesnt work:
de.json
{
...
"app" : {
"btn_login": "Einloggen"
}
}

en.json
{
...
"app" : {
"btn_login": "Login"
}
}

login.html
...
<button id="btn_login">btn_login</button>

(iOS) Does not support encoded characters in project name (&amp;)

Hello 👋
Thanks for this plugin.

I have a use-case where the project name contains encoded characters food&good.

In my config.xml, the & is encoded as &amp; -> <name>food&amp;good</name>

Cordova handles this name and decode &amp;. Everything works fine on Xcode, I can build the project.

When this plugin is added, the prepare process return an error:

Executing script found in plugin cordova-plugin-localization-strings for hook "after_prepare": plugins/cordova-plugin-localization-strings/scripts/create_strings.js
Error: Cannot read property 'project' of undefined

I search the root cause and it seems the plugin is trying to find the project at path /food&amp;good/ and does not find it. It is expected as the project path is food&good. The function getProjectName does not decoded encoded characters.

To reproduce

  1. start a new Cordova project cordova create hello com.example.hello "Hello&World"
  2. go to project cd hello
  3. add iOS platform cordova platform add ios
  4. prepare iOS (it does work) cordova prepare ios
  5. add plugin cordova plugin add cordova-plugin-localization-strings
  6. prepare iOS again (it does NOT work) cordova prepare ios

Quick and dirty fix

For my case, I change the file scripts/create_ios_strings.js

diff --git a/node_modules/cordova-plugin-localization-strings/scripts/create_ios_strings.js b/node_modules/cordova-plugin-localization-strings/scripts/create_ios_strings.js
index 5d46c73..f286a2f 100755
--- a/node_modules/cordova-plugin-localization-strings/scripts/create_ios_strings.js
+++ b/node_modules/cordova-plugin-localization-strings/scripts/create_ios_strings.js
@@ -24,7 +24,7 @@ function getProjectName() {
     if (!matches)
         matches = config.match(new RegExp('<name short=".*?">(.*?)</name>', 'i'));
 
-    return (matches && matches[1]) || null;
+    return (matches && matches[1]).replace('&amp;','&') || null;
 }
 
 function initIosDir() {

Not dirty fix

I tried to find how cordova decode the project name, but I did not find it. It seems he lib can do this, but it adds a dependency (https://www.npmjs.com/package/he#hedecodehtml-options)

Custom TRANSLATION_PATH not working or ignored

I have the following default path in the packages.json file.

"cordova-plugin-localization-strings": {
  "TRANSLATION_PATH": "translations/app/"
}

Any other path seems to be ignored.
Therefore, translations are not found/copied over when building the app.

Any idea about this ?
Thanks

Duplicate entries in Xcode Resources for localisation files

When building for iOS, as well as copying translations to the correct folder, they need to be added as Resources in the Xcode project. The plugin does this correctly, but it seems to be adding them to Resources each time -- it should only do this the first time. The result is duplicate entries in Resources, which causes builds to fail with an error like:

error: failed to remove /Users/x/Library/Developer/Xcode/DerivedData/app_id/Build/Products/Debug-iphoneos/AppName.appex/de.lproj/Localizable.strings: “Localizable.strings” couldn’t be removed.

Below is a screenshot showing the duplicates in Xcode. In this case there are two sets, but I have seen up to four.
screen shot 2017-09-05 at 18 26 09

I guess the fix here is to check if the file exists in Resources already before adding it. Is that possible with the current set up?

Cannot build platform

Hi,
I've just installed this plugin and now I cannot build any platform. When I run "cordova build ios", nothing happens..
If I remove the plugin, It works properly.
I've tried to update cordova to last version (6.5.0) and neither works.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.