You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2022/02/10 23:19:06 UTC

[GitHub] [cordova-ios] ath0mas opened a new issue #1222: Setting the `defaultlocale` should update developmentRegion and knownRegions in pbxproj

ath0mas opened a new issue #1222:
URL: https://github.com/apache/cordova-ios/issues/1222


   # Feature Request
   
   ## Motivation Behind Feature
   <!-- Why should this feature be implemented? What problem does it solve? -->
   Since #237 adding a `defaultlocale="XX"` attribute to the `widget` tag in _config.xml_ allows to set the `CFBundleDevelopmentRegion` to a different language (in the _<project_name>-Info.plist_ file).
   
   ⇒ This same language should also be applied into the pbxproj files of the project and CordovaLib, to replace the hardcoded `en` from the templates for `developmentRegion` and `knownRegions`.
   
   
   ## Feature Description
   <!-- 
   Describe your feature request in detail
   Please provide any code examples or screenshots of what this feature would look like
   Are there any drawbacks? Will this break anything for existing users? 
   -->
   The templates for the project and CordovaLib are used to init the iOS project structure.
   
   With previous #237, the [\_\_PROJECT_NAME\_\_-Info.plist](https://github.com/apache/cordova-ios/blob/master/templates/project/__PROJECT_NAME__/__PROJECT_NAME__-Info.plist) file is modified to target `CFBundleDevelopmentRegion` and replace the hardcoded value of [`en_US`](https://github.com/apache/cordova-ios/blob/master/templates/project/__PROJECT_NAME__/__PROJECT_NAME__-Info.plist#L6) with the language set through `defaultlocale`.
   
   Same should be done in [project pbxproj](https://github.com/apache/cordova-ios/blob/master/templates/project/__PROJECT_NAME__.xcodeproj/project.pbxproj) file and [CordovaLib pbxproj](https://github.com/apache/cordova-ios/blob/master/CordovaLib/CordovaLib.xcodeproj/project.pbxproj) file, targeting [`developmentRegion`](https://github.com/apache/cordova-ios/blob/master/templates/project/__PROJECT_NAME__.xcodeproj/project.pbxproj#L236) ([+](https://github.com/apache/cordova-ios/blob/master/CordovaLib/CordovaLib.xcodeproj/project.pbxproj#L507)) and [`knownRegions`](https://github.com/apache/cordova-ios/blob/master/templates/project/__PROJECT_NAME__.xcodeproj/project.pbxproj#L238) ([+](https://github.com/apache/cordova-ios/blob/master/CordovaLib/CordovaLib.xcodeproj/project.pbxproj#L509)) and replacing the hardcoded value of `en` there too.
   
   
   ## Alternatives or Workarounds
   <!-- 
   Describe alternatives or workarounds you are currently using 
   Are there ways to do this with existing functionality?
   -->
   Custom script after platform install.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org