Bug with automating iOS strings sync'ing
Hi,
I'm currently working on a script that will synchronize the terms and translations in Poeditor with an iOS project. I have it set up to import the iOS project's .strings file to Poeditor using the REST API, and then export from Poeditor back to the iOS project.
The idea being I can run this once per day to automatically sync the new translations and newly added unlocalized strings with Poeditor without human intervention.
However, there's a problem. Terms added through Poeditor with a "context" field are exported to the iOS strings file with that context as a comment above the translation. E.g.
/This is some context info inputted in Poeditor's web interface/
"Some Words" = "Some Words";
However, when we upload this, Poeditor uses this comment as a "comment" instead of "context". This is causing a duplicate term to be added to the Poeditor project. One with the term "Some Words" with the descriptive sentence as a "context" and another with the term "Some Words" with the same sentence as a comment.
I know this requests breaks compatibility in either the comment or context for iOS strings files, however, I'd like to see the comment in the iOS strings file always be interpreted as "context" instead of a "comment". This makes more sense, since this is what the strings comment should be used for anyway. Adding that field as a "comment" may not even make sense, since the term if it already exists on Poeditor, may already have a series of comments anyway. This should really be set as the "context" field.
-
Hello,
If you add the terms the same way you added them before, you shouldn't have duplicates.
Please notice that .strings files don't have/support context. So we do not expect users playing with .strings to make use of that value for obvious reasons.
Basically, the "issue" is that we don't support any Context to .strings because this file doesn't support this attribute.
Please do not make use of Context if the file you are working with does not support it.