turquoiseowl / i18n

Smart internationalization for ASP.NET
Other
556 stars 156 forks source link

Po filename customization + multiple po sources #308

Closed Sshnyari closed 7 years ago

Sshnyari commented 7 years ago

see #305

turquoiseowl commented 7 years ago

Are you able to inclkude a README section to help me and others understand your new feature. Thanks.

turquoiseowl commented 7 years ago

Nice work, thanks.

turquoiseowl commented 7 years ago

Just noticed a possible bug introduced by this code.

Before this change, repeated running of PostBuild on a static source file was resulting in the following message in a PO file:

#: Controllers\AccountController.cs:336
msgid "Account creation failed"
msgstr ""

Now I'm getting the message entry as follows:

# Controllers\AccountController.cs:336
#: Controllers\AccountController.cs:336
#, Controllers\AccountController.cs:336
msgid "Account creation failed"
msgstr ""

which I don't think is correct.

@Sshnyari Are you able to look into this please? Thanks.

turquoiseowl commented 7 years ago

@Sshnyari To be clear, the first time PostBuild is run, all is correct; it's the second and subsequent times that cause the suspect output.

Sshnyari commented 7 years ago

Weird I also had this issue with a custom post build project, but when I tested it with the solution's post build it seemed to disapear. I didn't look too much into it.

I have a question about this bit of code (POTranslationRepository.cs:477) : (k, v) => { v.References = v.References.Append(item.References); var referencesAsComments = item.References.Select(r => r.ToComment()).ToList(); v.ExtractedComments = v.ExtractedComments.Append(referencesAsComments); v.TranslatorComments = v.TranslatorComments.Append(referencesAsComments); v.Flags = v.Flags.Append(referencesAsComments); return v; });

Why are references appended to Flags and translator comments ? Is this a PO requirement ?

turquoiseowl commented 7 years ago

I don't know off-hand.

Sshnyari commented 7 years ago

Ok, I'll try to fix it without touching that then

Sshnyari commented 7 years ago

it should be OK now in #320