-
-
Notifications
You must be signed in to change notification settings - Fork 202
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
Update localizations button #227
Update localizations button #227
Conversation
} | ||
} | ||
|
||
public struct CsvEntry |
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.
If this struct isn't used outside this file, can it be private?
|
||
mergedEntries.Sort((a, b) => a.lineNumber.CompareTo(b.lineNumber)); | ||
|
||
//foreach (CsvEntry e in mergedEntries) |
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.
Can you remove this commented-out debugging code?
@@ -160,4 +173,229 @@ public class YarnImporterEditor : ScriptedImporterEditor { | |||
|
|||
AssetDatabase.ImportAsset(assetPath); | |||
} | |||
|
|||
void UpdateLocalizations(string newBaseCsv) |
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.
The documentation is really comprehensive in the second half of MergeStringTables
, but there's a bit less in the first half and in UpdateLocalizations
. Can you expand on the comments 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.
Yep, new commit up with more comments and fixes
- comments - removed debug code - cleaned up the for-loop in UpdateLocalizations() - fixed a place where it didn't add the "(((NEW LINE)))" to new lines - made the struct private
Added a "Update Localizations" button to the Yarn Importer Editor. It goes through each string table CSVs in
localizations
, compares it to the base string table, merges them based on a set of rules, and creates updated versions of the localizations in seperate files.Specifics on the merge rules used can be found as comments in the code.