hacs / frontend

The frontend of HACS
MIT License
155 stars 84 forks source link

Update en.json #680

Closed Betacart closed 1 year ago

Betacart commented 1 year ago

Changed placeholder and sentence formatting.

ludeeus commented 1 year ago

Moved to draft as the quote change does not seem to be needed.

Betacart commented 1 year ago

As I cannot post screenshots on Discord, let me put them here.

This is image of error, when I want to save {repository} variable in HACS Lokalise. It doesn't matter, if I use "{repository}" or {repository} or just {repository}. In either case, I am getting error from Lokalise about inconsistent variables. If I use '{repository}', it can be saved, but in that case, expression is not taken as variable, but as normal text. So, in sentence, it will not replace "{repository}" as "1.2.3" for example.

Snímek obrazovky 2023-10-12 v 16 53 00

And here is same variable sentence taken from Home Assistant strings, where variable in same format (curly brackets and inside them is variable name itself) are no problem to save or to format.

Snímek obrazovky 2023-10-12 v 16 54 06
ludeeus commented 1 year ago

So, in sentence, it will not replace '{repository}' as "1.2.3" for example.

And how did you verify that? Because when I test it, it does.

Betacart commented 1 year ago

Really? I just assuming this by changing color of variable, when I put it between ' and '. When use other or not use anything, it is highlighted as variable. I will test it right now.

Betacart commented 1 year ago

Hmm, I cannot reproduce raising this string. I added new custom repository, but I was not notified by "my::add_repository_description" string about tracking newly added repository. Do you have any hint, how to raise this string?

ludeeus commented 1 year ago

this.hacs.localize("my.add_repository_description", {repository: "some/repo"})

Betacart commented 1 year ago

? What to do with this command pls ?

ludeeus commented 1 year ago

You place it somewhere in your dev setup.

Betacart commented 1 year ago

Sorry, I don't understand, how to test it in Home Assistant instance. I have searched in Developer tools, but really, don't know, how to...

ludeeus commented 1 year ago

You cant. You need HACS frontend dev setup.

Im going to close this PR, as from my own testing, this is working as intended with the current formating 👍

Betacart commented 1 year ago

OK, if it working, then you can close it. I will translate it as formatted in original string and will continue to monitor it. Thank you anyway!