-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: localization token dropdown #87
base: master
Are you sure you want to change the base?
Conversation
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.
Great update so far! I highlighted a few concerns in the code.
Please, address those. If you have any questions - let me know, would be happy to help.
|
||
internal void FinalizeDataUpdate() | ||
{ | ||
OnDataStoredOnDisk?.Invoke(); |
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.
OnDataStoredOnDisk?.Invoke(); | |
OnDataStoredOnDisk.Invoke(); |
Redundant null-check here. If you initialize event Action
with an empty delegate (just like on Line 55), there is no need to check it for a null before invocation.
com.stansassets.google-doc-connector-pro/Runtime/Localization/LocalizedLabel.cs
Show resolved
Hide resolved
/// <summary> | ||
/// An event track the saving of spreadsheet data. | ||
/// </summary> | ||
public event Action OnDataStoredOnDisk = delegate { }; |
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.
public event Action OnDataStoredOnDisk = delegate { }; | |
public event Action<DataStoredOnDiskArgs> OnDataStoredOnDisk = delegate { }; |
We should consider providing an Arguments struct for this event Action
(yes, it will be just an empty struct DataStoredOnDiskArgs{}
for the moment). It will save us from breaking changes in future updates. Just in case we will need to pass additional data with this Action
.
/// <summary> | ||
/// Notify that the language settings of the spreadsheet have been changed | ||
/// </summary> | ||
void NotifyLanguageChanged() |
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.
void NotifyLanguageChanged() | |
void OnDataStoredOnDiskHandler() |
The callback method name is out of our convention. Please, consider renaming.
/// </summary> | ||
void NotifyLanguageChanged() | ||
{ | ||
OnLanguageChanged?.Invoke(); |
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.
Redundant null-check here. If you initialize event Action
with an empty delegate (just like on Line 12), there is no need to check it for a null before invocation.
Purpose of this PR
Added option to select localization token from available tokens in selected sheet.
Testing status
Manual testing status
Tested in the editor using created Sample scene.