hslayers / hslayers-ng

User interface and map building extensions for OpenLayers
https://ng.hslayers.org/
MIT License
36 stars 20 forks source link

Broken i18n strings in Save-map panel #3323

Closed jmacura closed 2 years ago

jmacura commented 2 years ago

Bug

Describe the bug Translation strings are not loaded for save-map panel.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Save current map panel'
  2. Click inside 'Name' field (or 'Abstract' or 'Keywords')
  3. See the translateHs plain interpolation string

Expected behavior Translation shall appear there.

Screenshots image

Additional context Found at https://hub4everybody.lesprojekt.cz/map/ Observed in Firefox 104, not observed in Edge 105

DailisLangovskis commented 2 years ago

@jmacura Hey, I just went to H4E to the same panel also logged in, and didn't notice this bug. Could there be something else causing this? Also does the map has ID set, maybe the {app} is undefined at some point and the translation breaks?!?

jmacura commented 2 years ago

@DailisLangovskis Good point. Only relevant to Firefox browser. There is literally nothing when I open the form in Edge. image

jmacura commented 2 years ago

And I have checked that the map has an ID 'map1' set, so it is neither 'default' nor undefined.

raitisbe commented 2 years ago

Missing {{ }} in line `placeholder="'COMMON.name' | translateHs...

On Tue, 6 Sept 2022, 22:38 jmacura, @.***> wrote:

And I have checked that the map has an ID 'map1' set, so it is neither 'default' nor undefined.

— Reply to this email directly, view it on GitHub https://github.com/hslayers/hslayers-ng/issues/3323#issuecomment-1238574437, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADAR6XZWVJI563XVLLKXLTV46MTNANCNFSM6AAAAAAQFKGKG4 . You are receiving this because you were assigned.Message ID: @.***>

DailisLangovskis commented 2 years ago

I'd say, that placeholder should be wrapped in [] brackets.

raitisbe commented 2 years ago

Than pipe | wouldnt be evalued imho but can try

On Tue, 6 Sept 2022, 22:46 Dailis, @.***> wrote:

I'd say, that placeholder should be wrapped in [] brackets.

— Reply to this email directly, view it on GitHub https://github.com/hslayers/hslayers-ng/issues/3323#issuecomment-1238581756, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADAR6SP5MW5NSWMUNDGD2DV46NRPANCNFSM6AAAAAAQFKGKG4 . You are receiving this because you were assigned.Message ID: @.***>

DailisLangovskis commented 2 years ago

@jmacura Can You test if this fixes it now?

jmacura commented 2 years ago

@DailisLangovskis It does fix it, indeed. Thanks!

Though I am curious why all these placeholders are empty.. Or is it only me again? image

DailisLangovskis commented 2 years ago

@DailisLangovskis It does fix it, indeed. Thanks!

Though I am curious why all these placeholders are empty.. Or is it only me again? image

I guess here is why -> Issue