Repository navigation
Localization implementation - #51
Conversation
| public class LocaleUtils | ||
| { | ||
|
|
||
| private static Locale sLocale; |
There was a problem hiding this comment.
Is it just a local variable to store current locale? If yes, please rename it to currentLocale.
BTW, why it's static?
| { | ||
| //Wrapping the configuration to avoid Activity endless loop | ||
| Configuration config = new Configuration(configuration); | ||
| // We must use the now-deprecated config.locale and res.updateConfiguration here, |
There was a problem hiding this comment.
We're not supporting API level 17, is it code needed?
| } | ||
| return ci; | ||
| } | ||
| string AndroidToDotnetLanguage(string androidLanguage) |
There was a problem hiding this comment.
We're not supporting all of this languages, why do we need this code?
Just fall back to "en", if current locale is not "ru"
There was a problem hiding this comment.
For example, if user has such languages, there might be exception.
| this.Navigation = navigation; | ||
| Resources = new LocalizedResources(typeof(ApplicationResources.AppResources), CurrentLanguage); | ||
| } | ||
| //public new void OnPropertyChanged([CallerMemberName]string property = null) |
There was a problem hiding this comment.
Can be deleted, I think?
| var netLanguage = platCulture.LanguageCode; // use the first part of the identifier (two chars, usually); | ||
| switch (platCulture.LanguageCode) | ||
| { | ||
| case "pt": |
There was a problem hiding this comment.
Removed unsupported locales here and above
|
|
||
| private static Locale sLocale; | ||
| public static void setLocale(Locale locale) | ||
| private static Locale currentLocale; |
There was a problem hiding this comment.
Now I see that this is a duplicate of Locale.Default - why do we need it?
| <AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile> | ||
| <AndroidApplication>True</AndroidApplication> | ||
| <AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk> | ||
| <AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk> |
There was a problem hiding this comment.
Why not use latest SDK?
There was a problem hiding this comment.
It's recommended to set compile version equal to target
If everybody builds project using Android 8, then we'll have less problems (we all know stability of Xamarin)
There was a problem hiding this comment.
@bruce-willis OK, we just need not to forget to update to the latest SDK in the future.
| public MeetupsViewModel(INavigation navigation) | ||
| : base(navigation) | ||
| { | ||
| MessagingCenter.Subscribe<LocalizedResources>(this, MessageKeys.LanguageChanged, sender => SortEvents()); |
There was a problem hiding this comment.
Why do we need to sort events here?!
There was a problem hiding this comment.
When language changed we need to sort again (new lexicographic order) & update UI (see SortEvents for more information)
There was a problem hiding this comment.
@bruce-willis events are just meetups (so please rename the SortEvents) method - and they are sorted by date.
| <AssemblyName>DotNetRu.Droid</AssemblyName> | ||
| <EmbedAssembliesIntoApk>false</EmbedAssembliesIntoApk> | ||
| <AndroidSupportedAbis>armeabi-v7a</AndroidSupportedAbis> | ||
| <AndroidSupportedAbis>armeabi-v7a;x86</AndroidSupportedAbis> |
There was a problem hiding this comment.
Please create a new configuration for Emulator if you need to.
Debug builds for real device should be fast, we don't want to spent time for compiling for unneeded architecture
| public class LocaleUtils | ||
| { | ||
|
|
||
| private static Locale currentLocale; |
There was a problem hiding this comment.
Is it a duplicate of Locale.Default?
| @@ -0,0 +1,91 @@ | |||
| using System; | |||
There was a problem hiding this comment.
Same comments as for Android - remove unneeded locales
* Showing meetups and sessions (#18) * add first fersion of meetups * Add talks for meetups * Group talks by year * Some fixes, code image add * Friends implementation * Added support for iOS build & deployment * Updated Xamarin.Forms to 2.4 (#25) * Updated Xamarin.Forms to 2.4.0 * Temporarily disabled AppLinks functionality to improve performance * Updated some NuGet packages * Added about DotNetRu (#22) * Change link to repo * Remove number of meetups in title * Disabled Mono Shared Runtime (#32) Disable Monon Shared Runtime due to issues with app launching * Feature/uiimprovements (#42) * Improved Talk page * Session time imrpovements - now showing just day, instead of some random time * Major Resharper refactorings * Embedded images (#43) * Optimizing project structure, moving business logic away from Mock projects * Fixed namespaces for Audit project * Use local images for speakers * Added logos for friends * Enable Fast Renderers * Removed dependendies on Mock project * UI Improvements (#45) * Minor UI improvements * Removed session time from UI * Moved backend logic to Audit project * Improved Meetup page UI (#46) Added talk section Added venue section Added talks on Speaker page * About Page (#47) * Fixed sharing text on talk page * Improved About Page for iOS * iOS: Friends moved to a separate tab * Fixed links on About page * Localization implementation (#51) * First steps to make localization * basic changes for localization * LanguageImplementation Except menu * Code clean, deleted redundant files * Little fixes * Little cleanup * some more little improvments * add saving language * delete unneeded comments * renaming * remove other languages * update ios language choose * Storageoptimizations (#56) * Updated XML files, improved performance * Updated Audit data - XML and images * Updated project file to reflect a new storage structure * Removed unneeded files * Bottom bar + UI improvements (#55) * First steps to make localization * Basic changes for localization * Code clean, deleted redundant files * /localization: bottomBar implementation * BottomBar final fixes * UI improvements * Added splashscreen, changed statusbar color etc * Code Clean up * Removing fat title * Merge branch 'develop' into feature/androidBottomBar * Moved bottom bar to nuget package * small cleanup * Changed iconpath * Removed local package * Added package from nuget * Feature/xf2.5 (#57) * Removed obsolete projects * Fixed displaying of speaker photos and friends * Removed unneeded components * Updated Xamarin.Forms to 2.5 * Feature/analytics (#60) * Added App Center analytics & crashes nuget packages * Enabled AppCenter Analytics & Crashes * Removed Google Analytics * Feature/iOSMenuFixes (#61) * iOS Color Fix * Fixed title in menu for iOS * Removed unneeded references, updated Android.Support Nuget packages (#62) Optimized NuGet dependencies * UI improvements: Speaker Details page (#66) * Uiimprovements4 (#67) * Added separate image for talks with several speakers * Meetups page: month are now in title case * Upgraded to .NET 4.6 * Friends are now sorted by number of meetups * Making bottom navigation bar look more stock (#75) * About Page (#69) * About Page improvements and fixes * Improved language change * Icon Fixes for settings page * Fixed language change * Minor language fixes * Further language improvements * Fixed solution namespaces (#85) * Fixed namespaces in DotNetRu.Clients.Portable * Fixed namespaces in DotNetRu.Clients.UI * Fixed namespaces in DotNetRu.Utils * Fixed namespaces in DotNetRu.iOS.UpNext * Fixed namespaces for DotNetRu.Android * Removed obsolete references * About page UI improvements (#84) * About page UI improvements: local images, language changing and more * ui improvements after beta #3 (#88) * UI fixes: Speaker page, translation, about page and more * Removed obsolete RootPageiOS * Updated Audit (#89) * Improved Twitter UI (#94) * Improved Twitter UI * Improved custom ListView control * Minor fixes for Live Player * Ui improvements beta 5 (#96) * Language change improvements, * NonScrollableListView fixes * Added DotNetRu logo on About screen * Added Meetup date on Meetups page * add divider * Fixed LinqToTwitter NuGet package (#98) * wrap text on image * Ui improvements beta 7 (#99) * Fixed Speaker image * Improved News page - simplified layout Improved NonScrollableListView Fixed Speaker page issues with talks/follow items not being displayed * Updated Android & iOS project to use PackageReference * Fix of packages.config error (#101) * change url * Updated NuGet packages (#104) * Updated all project to use Package Reference * Updated XF package * Updated several packages * Updated ALL nuget packages * Fixed crash on News page * About page: white background for about text (#106) * white background for grid * Fix white background for meetup page (#107) * Add background color for scroll view * Feature/customizing twitter look (#108) * Good-looking twitter page * Fixed links, images and counters * Retweet name fix * PullToRefresh fix * Increased Tweeter feed to 20 tweets * Updated Audit, fixed compilation * Feature/documentation (#118) * Updated Audit, fixed compilation (#113) * update readme & create issue template * add description and screenshots * Update README.md
* Showing meetups and sessions (#18) * add first fersion of meetups * Add talks for meetups * Group talks by year * Some fixes, code image add * Friends implementation * Added support for iOS build & deployment * Updated Xamarin.Forms to 2.4 (#25) * Updated Xamarin.Forms to 2.4.0 * Temporarily disabled AppLinks functionality to improve performance * Updated some NuGet packages * Added about DotNetRu (#22) * Change link to repo * Remove number of meetups in title * Disabled Mono Shared Runtime (#32) Disable Monon Shared Runtime due to issues with app launching * Feature/uiimprovements (#42) * Improved Talk page * Session time imrpovements - now showing just day, instead of some random time * Major Resharper refactorings * Embedded images (#43) * Optimizing project structure, moving business logic away from Mock projects * Fixed namespaces for Audit project * Use local images for speakers * Added logos for friends * Enable Fast Renderers * Removed dependendies on Mock project * UI Improvements (#45) * Minor UI improvements * Removed session time from UI * Moved backend logic to Audit project * Improved Meetup page UI (#46) Added talk section Added venue section Added talks on Speaker page * About Page (#47) * Fixed sharing text on talk page * Improved About Page for iOS * iOS: Friends moved to a separate tab * Fixed links on About page * Localization implementation (#51) * First steps to make localization * basic changes for localization * LanguageImplementation Except menu * Code clean, deleted redundant files * Little fixes * Little cleanup * some more little improvments * add saving language * delete unneeded comments * renaming * remove other languages * update ios language choose * Storageoptimizations (#56) * Updated XML files, improved performance * Updated Audit data - XML and images * Updated project file to reflect a new storage structure * Removed unneeded files * Bottom bar + UI improvements (#55) * First steps to make localization * Basic changes for localization * Code clean, deleted redundant files * /localization: bottomBar implementation * BottomBar final fixes * UI improvements * Added splashscreen, changed statusbar color etc * Code Clean up * Removing fat title * Merge branch 'develop' into feature/androidBottomBar * Moved bottom bar to nuget package * small cleanup * Changed iconpath * Removed local package * Added package from nuget * Feature/xf2.5 (#57) * Removed obsolete projects * Fixed displaying of speaker photos and friends * Removed unneeded components * Updated Xamarin.Forms to 2.5 * Feature/analytics (#60) * Added App Center analytics & crashes nuget packages * Enabled AppCenter Analytics & Crashes * Removed Google Analytics * Feature/iOSMenuFixes (#61) * iOS Color Fix * Fixed title in menu for iOS * Removed unneeded references, updated Android.Support Nuget packages (#62) Optimized NuGet dependencies * UI improvements: Speaker Details page (#66) * Uiimprovements4 (#67) * Added separate image for talks with several speakers * Meetups page: month are now in title case * Upgraded to .NET 4.6 * Friends are now sorted by number of meetups * Making bottom navigation bar look more stock (#75) * About Page (#69) * About Page improvements and fixes * Improved language change * Icon Fixes for settings page * Fixed language change * Minor language fixes * Further language improvements * Fixed solution namespaces (#85) * Fixed namespaces in DotNetRu.Clients.Portable * Fixed namespaces in DotNetRu.Clients.UI * Fixed namespaces in DotNetRu.Utils * Fixed namespaces in DotNetRu.iOS.UpNext * Fixed namespaces for DotNetRu.Android * Removed obsolete references * About page UI improvements (#84) * About page UI improvements: local images, language changing and more * ui improvements after beta #3 (#88) * UI fixes: Speaker page, translation, about page and more * Removed obsolete RootPageiOS * Updated Audit (#89) * Improved Twitter UI (#94) * Improved Twitter UI * Improved custom ListView control * Minor fixes for Live Player * Ui improvements beta 5 (#96) * Language change improvements, * NonScrollableListView fixes * Added DotNetRu logo on About screen * Added Meetup date on Meetups page * add divider * Fixed LinqToTwitter NuGet package (#98) * wrap text on image * Ui improvements beta 7 (#99) * Fixed Speaker image * Improved News page - simplified layout Improved NonScrollableListView Fixed Speaker page issues with talks/follow items not being displayed * Updated Android & iOS project to use PackageReference * Fix of packages.config error (#101) * change url * Updated NuGet packages (#104) * Updated all project to use Package Reference * Updated XF package * Updated several packages * Updated ALL nuget packages * Fixed crash on News page * About page: white background for about text (#106) * white background for grid * Fix white background for meetup page (#107) * Add background color for scroll view * Feature/customizing twitter look (#108) * Good-looking twitter page * Fixed links, images and counters * Retweet name fix * PullToRefresh fix * Increased Tweeter feed to 20 tweets * Updated Audit, fixed compilation (#113) * Updated Audit, fixed compilation (#116) * Updated Audit, fixed compilation * Feature/documentation (#118) * Updated Audit, fixed compilation (#113) * update readme & create issue template * add description and screenshots * Update README.md
* Showing meetups and sessions (#18) * add first fersion of meetups * Add talks for meetups * Group talks by year * Some fixes, code image add * Friends implementation * Added support for iOS build & deployment * Updated Xamarin.Forms to 2.4 (#25) * Updated Xamarin.Forms to 2.4.0 * Temporarily disabled AppLinks functionality to improve performance * Updated some NuGet packages * Added about DotNetRu (#22) * Change link to repo * Remove number of meetups in title * Disabled Mono Shared Runtime (#32) Disable Monon Shared Runtime due to issues with app launching * Feature/uiimprovements (#42) * Improved Talk page * Session time imrpovements - now showing just day, instead of some random time * Major Resharper refactorings * Embedded images (#43) * Optimizing project structure, moving business logic away from Mock projects * Fixed namespaces for Audit project * Use local images for speakers * Added logos for friends * Enable Fast Renderers * Removed dependendies on Mock project * UI Improvements (#45) * Minor UI improvements * Removed session time from UI * Moved backend logic to Audit project * Improved Meetup page UI (#46) Added talk section Added venue section Added talks on Speaker page * About Page (#47) * Fixed sharing text on talk page * Improved About Page for iOS * iOS: Friends moved to a separate tab * Fixed links on About page * Localization implementation (#51) * First steps to make localization * basic changes for localization * LanguageImplementation Except menu * Code clean, deleted redundant files * Little fixes * Little cleanup * some more little improvments * add saving language * delete unneeded comments * renaming * remove other languages * update ios language choose * Storageoptimizations (#56) * Updated XML files, improved performance * Updated Audit data - XML and images * Updated project file to reflect a new storage structure * Removed unneeded files * Bottom bar + UI improvements (#55) * First steps to make localization * Basic changes for localization * Code clean, deleted redundant files * /localization: bottomBar implementation * BottomBar final fixes * UI improvements * Added splashscreen, changed statusbar color etc * Code Clean up * Removing fat title * Merge branch 'develop' into feature/androidBottomBar * Moved bottom bar to nuget package * small cleanup * Changed iconpath * Removed local package * Added package from nuget * Feature/xf2.5 (#57) * Removed obsolete projects * Fixed displaying of speaker photos and friends * Removed unneeded components * Updated Xamarin.Forms to 2.5 * Feature/analytics (#60) * Added App Center analytics & crashes nuget packages * Enabled AppCenter Analytics & Crashes * Removed Google Analytics * Feature/iOSMenuFixes (#61) * iOS Color Fix * Fixed title in menu for iOS * Removed unneeded references, updated Android.Support Nuget packages (#62) Optimized NuGet dependencies * UI improvements: Speaker Details page (#66) * Uiimprovements4 (#67) * Added separate image for talks with several speakers * Meetups page: month are now in title case * Upgraded to .NET 4.6 * Friends are now sorted by number of meetups * Making bottom navigation bar look more stock (#75) * About Page (#69) * About Page improvements and fixes * Improved language change * Icon Fixes for settings page * Fixed language change * Minor language fixes * Further language improvements * Fixed solution namespaces (#85) * Fixed namespaces in DotNetRu.Clients.Portable * Fixed namespaces in DotNetRu.Clients.UI * Fixed namespaces in DotNetRu.Utils * Fixed namespaces in DotNetRu.iOS.UpNext * Fixed namespaces for DotNetRu.Android * Removed obsolete references * About page UI improvements (#84) * About page UI improvements: local images, language changing and more * ui improvements after beta #3 (#88) * UI fixes: Speaker page, translation, about page and more * Removed obsolete RootPageiOS * Updated Audit (#89) * Improved Twitter UI (#94) * Improved Twitter UI * Improved custom ListView control * Minor fixes for Live Player * Ui improvements beta 5 (#96) * Language change improvements, * NonScrollableListView fixes * Added DotNetRu logo on About screen * Added Meetup date on Meetups page * add divider * Fixed LinqToTwitter NuGet package (#98) * wrap text on image * Ui improvements beta 7 (#99) * Fixed Speaker image * Improved News page - simplified layout Improved NonScrollableListView Fixed Speaker page issues with talks/follow items not being displayed * Updated Android & iOS project to use PackageReference * Fix of packages.config error (#101) * change url * Updated NuGet packages (#104) * Updated all project to use Package Reference * Updated XF package * Updated several packages * Updated ALL nuget packages * Fixed crash on News page * About page: white background for about text (#106) * white background for grid * Fix white background for meetup page (#107) * Add background color for scroll view * Feature/customizing twitter look (#108) * Good-looking twitter page * Fixed links, images and counters * Retweet name fix * PullToRefresh fix * Increased Tweeter feed to 20 tweets * Updated Audit, fixed compilation (#113) * Updated Audit, fixed compilation (#116) * Updated Audit, fixed compilation * Feature/documentation (#118) * Updated Audit, fixed compilation (#113) * update readme & create issue template * add description and screenshots * Update README.md
Added localization everywhere except menu (it is implemented in another pull request (androidBottomBar))