Skip to content

Localization implementation - #51

Merged
pfedotovsky merged 13 commits into
developfrom
feature/localization
Nov 13, 2017
Merged

pfedotovsky merged 13 commits into
developfrom
feature/localization

Conversation

@spolezhaev

Copy link
Copy Markdown
Collaborator

Added localization everywhere except menu (it is implemented in another pull request (androidBottomBar))

Comment thread DotNetRu.Android/Helpers/LocaleUtils.cs Outdated
public class LocaleUtils
{

private static Locale sLocale;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it just a local variable to store current locale? If yes, please rename it to currentLocale.
BTW, why it's static?

Comment thread DotNetRu.Android/Helpers/LocaleUtils.cs Outdated
{
//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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're not supporting API level 17, is it code needed?

Comment thread DotNetRu.Android/Localize.cs Outdated
}
return ci;
}
string AndroidToDotnetLanguage(string androidLanguage)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be deleted, I think?

Comment thread DotNetRu.iOS/Localize.cs Outdated
var netLanguage = platCulture.LanguageCode; // use the first part of the identifier (two chars, usually);
switch (platCulture.LanguageCode)
{
case "pt":

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed unsupported locales here and above

@pfedotovsky pfedotovsky self-assigned this Nov 13, 2017

private static Locale sLocale;
public static void setLocale(Locale locale)
private static Locale currentLocale;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use latest SDK?

@bruce-willis bruce-willis Nov 13, 2017 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to sort events here?!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When language changed we need to sort again (new lexicographic order) & update UI (see SortEvents for more information)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pfedotovsky fixed

public class LocaleUtils
{

private static Locale currentLocale;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a duplicate of Locale.Default?

Comment thread DotNetRu.iOS/Localize.cs
@@ -0,0 +1,91 @@
using System;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comments as for Android - remove unneeded locales

@pfedotovsky
pfedotovsky merged commit 489cd6a into develop Nov 13, 2017
@pfedotovsky
pfedotovsky deleted the feature/localization branch November 25, 2017 19:08
pfedotovsky added a commit that referenced this pull request Jan 31, 2018
* 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
pfedotovsky added a commit that referenced this pull request Feb 2, 2018
* 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
pfedotovsky added a commit that referenced this pull request Feb 3, 2018
* 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
pfedotovsky added a commit that referenced this pull request Oct 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants