-
-
Notifications
You must be signed in to change notification settings - Fork 455
Fix LastQueryMode's selection display when switching language #1410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| List<LastQueryMode> modes = new List<LastQueryMode>(); | ||
| var enums = (Infrastructure.UserSettings.LastQueryMode[])Enum.GetValues(typeof(Infrastructure.UserSettings.LastQueryMode)); | ||
| foreach (var e in enums) | ||
| if (_lastQueryModes.Count == 0) | ||
| { | ||
| var key = $"LastQuery{e}"; | ||
| var display = _translater.GetTranslation(key); | ||
| var m = new LastQueryMode { Display = display, Value = e, }; | ||
| modes.Add(m); | ||
| _lastQueryModes = InitLastQueryModes(); | ||
| } | ||
| return modes; | ||
| return _lastQueryModes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
Though, I didn't see why this can fix the issue. It seems like you only add a cache for that (which is super reasonable though)?
Would you please explain a bit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.LastQueryMode add INotifyPropertyChanged interface
public class LastQueryMode : BaseModel
2.when modifying the language(Language set property),call UpdateLastQueryModeDisplay();
|
Just as a quick note, you don't have to modify all language file to add new translation string, just modify the base one (en.xaml) and the ones you do want to translate (se.xaml, zh-cn.xaml, zh-tw.xaml for this case) and others will be added automatically by the integration. |
…aml) and the ones I do want to translate
Fixed LastQueryMode's selection display when switching language and added Spanish translation.
Close #1409