How to translate new strings with functions
In the new strings recently added, there are a few which has a complex syntax, and I'm not sure on how to treat them.
For instance, the part between curly braces, like
And the 'Open' in the beginning, should be translated as well?
The key reference of this string is: item-menu-viewAttachment\.label
I have problems understanding also this one:
Key: return-or-enter
Is it just because the same physical key on the keyboard has different names on MacOs and on PCs? I think I've seen other strings referring to this by a block {return-or-enter}, in those case I have to leave the reference as it is and it'll get the translation from this original string, right?
This one has a similar problem:
My guess is to translate underlined text, is this correct?
For this one I have no clue:
Key: runJS-result
Thanks, that's it for now, but I'll post more if I find other obscure strings ;-)
Open {numAttachments, plural, one {{attachmentType, select, pdf {PDF} epub {EPUB} snapshot {Snapshot} other {Attachment}}} other {{attachmentType, select, pdf {PDFs} epub {EPUBs} snapshot {Snapshots} other {Attachments}}}} {openIn, select, tab {in New Tab} window {in New Window} other {}}
For instance, the part between curly braces, like
{PDF}
should be translated or it's a reference to another strings to get the translation from there?And the 'Open' in the beginning, should be translated as well?
The key reference of this string is: item-menu-viewAttachment\.label
I have problems understanding also this one:
{PLATFORM(), select, macos {Return} other {Enter}}
Key: return-or-enter
Is it just because the same physical key on the keyboard has different names on MacOs and on PCs? I think I've seen other strings referring to this by a block {return-or-enter}, in those case I have to leave the reference as it is and it'll get the translation from this original string, right?
This one has a similar problem:
{numItems, plural, =0 {No items were imported} one {One item was imported} other {{ numItems } items were imported}}Key: file-interface-items-were-imported
My guess is to translate underlined text, is this correct?
For this one I have no clue:
{type, select, async {Return value:} other {Result:}}
Key: runJS-result
Thanks, that's it for now, but I'll post more if I find other obscure strings ;-)
https://s3.amazonaws.com/zotero.org/images/forums/u2433/cgdrr1qg3aiiehtugwwe.png
(so basically yes to all your questions).
The second one is this (which has different, 0, singular, plural) language:
https://s3.amazonaws.com/zotero.org/images/forums/u2433/semlxg647dewwut4f4ly.png
The third one is this (your translating "Result:" and "Return value:, the latter is shown when you use async mode):
https://s3.amazonaws.com/zotero.org/images/forums/u2433/nlobzbgvg89dwpmb5d43.png
Going on with the translation, I've found a string that needs an update: section-related\.label doesn't have the multiple choices in transifex for 1, many, other like notes, attachments, etc. but does need it for other languages like Italian. @dstillman
And just to note for others, the plural options ("one", "many", "other", etc.) are language-specific, based on the CLDR plural categories. For some strings, Transifex will show a nice little interface for those with the appropriate categories for your language, but for others you'll unfortunately need to edit the markup manually and add the appropriate categories for your language. (We've added some checks on our end to try to catch any errors that are introduced.)
Saving 1$1 items. 2$2
Key: progressWindow_savingItems
(I cannot figure ouot the 2$2 variable)
Target collection selector
key: progressWindow_collectionSelector
Saved 1$1 for item 2$2
key: progressWindow_downloadCompletePlural
Thanks
progressWindow_downloadCompletePlural: 1$1 is the item type, 2$2 is the numeric index of the item that got saved.