Comments (5)
hi gitito, i have not tested with phonegap before, only cordova. In fact, the node scripts I used, reply on a cordova context like:
var path = context.requireCordovaModule('path');
I will try to make it work with phonegap when i get the chance.
from cordova-plugin-localization-strings.
hi gitito,
I wasn't able to reproduce the error on Node 7.9.0, PhoneGap 6.5 and iOS 4.3.0 (I tried using a fresh nvm install of Node 7.8.0 and Node 6.8.0 too). I am running Mac OS X 10.12.4. I have not tried running the plugin on Windows nor Linux. Could it be a OS problem?
I did this:
nvm install 7.9.0
nvm use 7.9.0
npm install -g phonegap@latest
phonegap create phonegap-hello --template hello-world
cd hello-world
...
[copy and mkdir the translations folder with the json files here]
...
phonegap plugin add cordova-plugin-localization-strings --fetch
phonegap platform add [email protected]
phonegap build ios -d
Basically I was able to build. The phonegap build logs show:
�[36m[phonegap]�[39m executing 'cordova build ios -d ' ...
No scripts found for hook "before_build".
No scripts found for hook "before_prepare".
Checking config.xml for saved platforms that haven't been added to the project
Checking for any plugins added to the project that have not been installed in ios platform
No differences found between plugins added to project and installed in ios platform. Continuing...
Generating platform-specific config.xml from defaults for iOS at /Users/kelvinho/work/phonegap-apps/phonegap-hello/platforms/ios/helloworld/config.xml
Merging project's config.xml into platform-specific iOS config.xml
Merging and updating files from [www, platforms/ios/platform_www] to platforms/ios/www
copy platforms/ios/platform_www/cordova_plugins.js platforms/ios/www/cordova_plugins.js (updated file)
Current launch storyboard undefined
Not changing launch storyboard setting.
Wrote out iOS Bundle Identifier "com.phonegap.helloworld" and iOS Bundle Version "1.0.0" to /Users/kelvinho/work/phonegap-apps/phonegap-hello/platforms/ios/helloworld/helloworld-Info.plist
iOS Product Name has not changed (still "helloworld")
Updating icons at platforms/ios/helloworld/Images.xcassets/AppIcon.appiconset/
Updating splash screens at platforms/ios/helloworld/Images.xcassets/LaunchImage.launchimage/
Prepared iOS project successfully
Executing script found in plugin cordova-plugin-localization-strings for hook "after_prepare": plugins/cordova-plugin-localization-strings/scripts/create_ios_strings.js
Resolving module name for path => path
Resolving module name for q => q
Resolving module name for glob => glob
Resolving module name for q => q
Resolving module name for path => path
Resolving module name for glob => glob
new pbx project written with localization groups
...
[more build logs]
...
from cordova-plugin-localization-strings.
I have same problem when using
node 4.4.7
npm 2.15.8
from cordova-plugin-localization-strings.
node 4.4.7
filesystem works with file path(string) only
function writeStringFile(plistStringJsonObj, lang, fileName) {
var lProjPath = getTargetIosDir() + "/Resources/" + lang + ".lproj";
fs.ensureDir(lProjPath, function (err) {
if (!err) {
var stringToWrite = jsonToDotStrings(plistStringJsonObj);
var buffer = iconv.encode(stringToWrite, 'utf16');
var filePath = lProjPath + "/" + fileName;
fs.open(lProjPath + "/" + fileName, 'w', function(err, fd) {
if(err) throw err;
fs.writeFileSync(filePath, buffer);
});
}
});
}```
from cordova-plugin-localization-strings.
Hi Fishkingsin,
Thanks for the feedback, I finally reproduced the error in a node 4.x.x environment (even 4.8.3).
I have tested again on several Node environments and found that the minimum requirement for this plugin is:
node 5.0.0
nom 3.3.6
cordova 6.0.0
Perhaps you can install nvm and change node environments and try the plugin again?
from cordova-plugin-localization-strings.
Related Issues (20)
- What is the default language if there are 2 languages specified HOT 1
- Plugin not working on Release Build iOS HOT 9
- Execution failed for task ':app:mergeDebugResources'. HOT 3
- Doesn't work in Phonegap Build (https://build.phonegap.com) HOT 3
- Not getting localized strings on iOS 13 HOT 2
- Remove lodash dependency? HOT 2
- Custom TRANSLATION_PATH not working or ignored HOT 3
- creating localisation with "-" fails on android HOT 2
- How to set fallback language HOT 3
- npm audit failes with 5 vulnerabilities (4 low, 1 moderate) HOT 4
- Force Android resConfigs HOT 1
- If missing config_android, then empty strings.xml will be created
- Prepare fails on iOS with "Error: Cannot read properties of undefined (reading 'project')" HOT 3
- Cordova plugin version is still on 3.2.1 HOT 3
- (iOS) Does not support encoded characters in project name (&) HOT 2
- projectFile import will break in cordova-ios@7 HOT 1
- Version 5.0.0 - 5.0.2 regex broken on Windows HOT 6
- Automatic tests HOT 1
- Possible VoltBuilder woes
- Installing the latest version causes an error → EUNSUPPORTEDPROTOCOL HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-localization-strings.