boxblinkracer / phpunuhi

PHPUnuhi - The easy composable framework to validate and manage translations
MIT License
72 stars 5 forks source link

Protect markers #22

Closed htuscher closed 1 year ago

htuscher commented 1 year ago

If you have translation markers e.g. The name of the product is %productName%. The placeholder %productName% should be protected from translation via translation services.

boxblinkracer commented 1 year ago

aaa thats a good one, thx @hhoechtl ill add it :)

would make sense to configure the marker right?

htuscher commented 1 year ago

Yes I think other systems have different markers .e.g. ###marker###

boxblinkracer commented 1 year ago

hey @hhoechtl

can you double check my screenshot (readme). not quite sure about the place for the configuration, also dont like the long names

what is your opinion on that? attribute in format? or in the rules? also we need start + end markers i think :)

thx for your help

Screenshot 2023-04-26 at 17 13 48
htuscher commented 1 year ago

@boxblinkracer I would maybe go even further. What do you think about something like this?

<set name="sample">
  <protect>
    <marker start="{" end="}" />
    <marker start="{%" end="%}" />
    <term>Shopware</term>
    <term>iPhone</term>
  </protect>
boxblinkracer commented 1 year ago

uuuuuu brilliant. gekauft ;) ill do it in that way. thanks a lot

boxblinkracer commented 1 year ago

done, ready on master and will come with next release again, thank you for this great idea :)