Summary: | Don't translate JSON keys | ||
---|---|---|---|
Product: | Koha | Reporter: | Magnus Enger <magnus> |
Component: | I18N/L10N | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | f.demians, jonathan.druart, julian.maurice |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: |
Description
Magnus Enger
2017-02-23 10:11:08 UTC
> Is there some way to mark a string so it does not get picked up for translation? In my opinion, it would be better to do the opposite: mark the strings that have to be translated, that would avoid the "%s" hell we have in some strings like this one and more generally that would prevent the translation to break things. But to be practical, I think the right way to do it is to not return any html in this JSON. The rendering code can be put in DataTables configuration (mRender property). For an example usage of mRender, see bug 15219 (In reply to Julian Maurice from comment #1) > But to be practical, I think the right way to do it is to not return any > html in this JSON. Not sure I see how this would stop the string "borrowernumber" from being translated? (In reply to Magnus Enger from comment #2) > (In reply to Julian Maurice from comment #1) > > But to be practical, I think the right way to do it is to not return any > > html in this JSON. > > Not sure I see how this would stop the string "borrowernumber" from being > translated? Sorry for not being clear I was just about to write another comment to explain it better :) By "not returning any html in this JSON" I also meant that we should not use Template::Toolkit to generate JSON. This way, its content won't go into PO files. (In reply to Julian Maurice from comment #3) > By "not returning any html in this JSON" I also meant that we should not use > Template::Toolkit to generate JSON. This way, its content won't go into PO > files. Yeah, that makes sense! (In reply to Julian Maurice from comment #3) > By "not returning any html in this JSON" I also meant that we should not use > Template::Toolkit to generate JSON. This way, its content won't go into PO > files. The problem we have is that we want some strings to be translated, things like "Edit", "Delete", "Email", etc. (In reply to Jonathan Druart from comment #5) > (In reply to Julian Maurice from comment #3) > > By "not returning any html in this JSON" I also meant that we should not use > > Template::Toolkit to generate JSON. This way, its content won't go into PO > > files. > > The problem we have is that we want some strings to be translated, things > like "Edit", "Delete", "Email", etc. You can do that in the template that make the DataTables call (using the mRender property) |