-
Notifications
You must be signed in to change notification settings - Fork 49
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
Bug: AssetManager returns a single result instead of the accumulated one #411
Comments
Indeed, I didn't remember that field texts were not aggregated. I need to switch them to I must admit, I barely ever worked on the Now, all the translation mods available use the |
@Tirlititi , recently, I added After refactoring it's easy to add support of external public interface ITextFormatter
{
ITextWriter GetWriter();
ITextReader GetReader();
}
public interface ITextWriter
{
void WriteAll(String outputPath, IList<TxtEntry> entries);
}
public interface ITextReader
{
TxtEntry[] ReadAll(String inputPath);
} About RGB colors, yes, I hardcoded it for better readability: {"[C8C8C8][HSHD]", "{White}"},
{"[B880E0][HSHD]", "{Pink}"},
{"[68C0D8][HSHD]", "{Cyan}"},
{"[D06050][HSHD]", "{Brown}"}, But neither |
Yes, I myself encountered this bug when trying to translate beatrix.mod into russian language. If you change the strings file line by line, everything works correctly. But if you insert the text as a whole block, then the changes do not take effect and it also breaks the russian translation. [FieldImporter] Initialization failed. System.Exception: Cannot read 146 entry from 0754_EVT_BURMECIA_HOUSE_0.strings.
Previous: [Index: 145, Pefix: $0754_EVT_BURMECIA_HOUSE_0_, Value: {W254H2}{Beatrix}
“Но, кажется, я была недостаточно готова.”]
---> System.Exception: Cannot parse .strings entry.
[Index: -1, Prefix: , Value: ]
[Buffer: = , Line: 0 IsKey: True, IsBlock: True, IsEscape: False]
---> System.ArgumentOutOfRangeException: Argument is out of range.
at System.Text.StringBuilder.ToString (Int32 startIndex, Int32 length) [0x00000] in <filename unknown>:0
01.05.2024 01:52:39 |E|
at Memoria.Assets.StringsFormatter.Read (System.IO.StreamReader sr) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Memoria.Assets.StringsFormatter.Read (System.IO.StreamReader sr) [0x00000] in <filename unknown>:0
at Memoria.Assets.TxtReader.Read (System.String& name) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Memoria.Assets.TxtReader.Read (System.String& name) [0x00000] in <filename unknown>:0
at Memoria.Assets.TxtReader.ReadStrings (System.String inputPath) [0x00000] in <filename unknown>:0
at Memoria.Assets.FieldImporter.ReadExternalText (Memoria.Assets.TxtEntry[]& entries) [0x00000] in <filename unknown>:0
at Memoria.Assets.FieldImporter.Initialize () [0x00000] in <filename unknown>:0
[FieldImporter] Failed to find zone by ID: 754].
[TextWatcher] Reinitialized for 00:00:00.2460550 |
@RuslanMikhlevskiy , you need to check the entry after It looks like an empty strings at the end of file that cannot be parsed as a key. |
@Tirlititi , @snouz , I found a nasty bug that at the very least makes it impossible to export texts when mods are installed, at most the method is used in many places, and I'm not sure that all of them are ready for the fact that they will receive only incremental changes instead of a complete list of strings.
Expected Behavior:
The
LoadString
method should perform smart aggregation by overriding existing rows and adding new ones. This allow us to translate mods such as Alternative Fantasy.The text was updated successfully, but these errors were encountered: