Placeholder dynamic decision

Sometimes I’m running into projects that didn’t set up their placeholder regex correctly or has multiple placeholder formats (%d alongside {count}, etc.).

I’m not sure what would be the best approach here, it could be handled by AI which may require accessing the code itself or collecting lots of samples and will require some method of reporting false positives.

The other option could be allowing the users to suggest placeholders so the project owner can review and see if it’s good enough (may also need an option to report false positives etc.).

1 Like

Hello Yaron

Thank you for reaching out to us.

When you have multiple custom placeholders keep in mind that they are executed in sequential order. This is described here.Sometimes making sure the placeholders work requires trial and error. Therefore I would recommend just as you suggested, that the project owner review the translation checks and ensures that they are in a logical order.

Please let me know if this helps.

Kind Regards,

1 Like

Nope, that’s not what I meant.

I meant that in certain cases the project maintainers are not configuring what is considered a non localizable placeholder (meaning I can click on it to copy it directly to the translation), in these cases I have to select the term manually and copy it to the translation instead of clicking on it or using the shortcut keys.

There are certain cases where different resources have different placeholder so even if I configure placeholders as “%s” “%d” etc. and the project also contains {{name}} {{type}} or any other option it won’t be clickable and I’ll have to copy it manually.

I know all the problems with the placeholders location and I know it’s up to the programmers.

Thanks.

I understand that some variables are not automatically recognized by transifex because they are considered custom ones so localization managers need to properly configure this on an organization level before sending the strings to translators for translation. If this step is omitted, translators will end up doing what you described above and of course this is not ideal. Code changes are not required in this case, since transifex allows localization managers to actually configure this in Transifex So, my suggestion is to create issues for such strings and ping loc managers so that they can properly set these placeholders and help translators with this type of text.
Does the above answer your question? If I have misunderstood though, please let me know.

Kind Regards,

OK so another suggestion, maybe designing a really simple method of detecting which words hasn’t changed between source and destination language and suggesting these as TM or placehoders to the project maintainer without manually reporting?

This way there will be no manual interruption and the translators will be able to see if there are things that better left unchanged.

The only trick is that it should be implemented on a statistical base while adding more score to non-latin scripts.

Any thoughts about that?

Hello Yaron

Thank you for your feedback. I am not sure something like that can be easily implemented, nevertheless I will inform our product team. I just wanted to first better understand what statistical basis you were thinking about for non-latin languages.

Kind Regards,

Not easily but it can take you one step further into deep learning of linguistical behavior.

Never mind, I guess you’re right, I wish there was an easier way to tell maintainers that the placeholder capture formula is not configured.

For who so if the mouse and who so is the lion. Please done leave markers. Or do. WhAT SANDWICH is best… that is the question.