Closed ayfie-arkadiusz-mazur closed 1 year ago
@ayfie-arkadiusz-mazur Thank you for reporting! Could you share your project with me? Or it might be enough to attach your i18n localized text jon files.
@jsakamoto Attached. It is though enough to provide wrongly constructed json files to reproduce the issue (in my case the json files generator was not adding comma characters between consecutive "key": "value"
pairs.
Could you please also expand the error description with the name of the problematic file? Currently developer is left with the message like:
error : IN002: After parsing a value an unexpected character was encountered: ". Path 'key1', line 3, position 2.
without any indication about the file that is broken (you may have several localized json files in the project sharing the same keys).
@ayfie-arkadiusz-mazur
I fixed those problems and published the new version today.
Please check it out.
Again, thank you for your contributions!
Wow! Errors handling enhanced much more than just to fix the issue I've reported. Thanks!
I'm wondering though if moving the code (here: IN002
) out of the message and storing it in the errorCode
field (instsead of the textual value of enum, here: SourceTextIsInvalidFormat
) wouldn't be better :-)
@ayfie-arkadiusz-mazur Thank you for your good suggestion! Yeah, you are right. I'll try to do that.
@ayfie-arkadiusz-mazur
Could you check the v.12.0.2 out?
@jsakamoto Works like a charm. Thanks!
I'm getting the following exception when trying to build my project using the latest version of the library (12.0.0):
I have an impression that problematic is the line no. 51 from the
Toolbelt.Blazor.I18nText/Toolbelt.Blazor.I18nText.CompileTask/CompileI18nText.cs
file, namely the$"IN{compilerEx.Code:D3}: {ex.Message}"
part. Imho, castingenum
toint
would do the job, i.e.$"IN{(int)compilerEx.Code:D3}: {ex.Message}"