onweru/compose

Translations from i18n/*.toml aren't respected in variables.js

Closed this issue ยท 11 comments

// defined in i18n / translation files
const quick_links = '{{ T "quick_links" }}';
const search_results_label = '{{ T "search_results_label" }}';
const short_search_query = '{{ T "short_search_query" }}'
const type_to_search = '{{ T "type_to_search" }}';
const no_matches_found = '{{ T "no_matches" }}';
const copy_text = '{{ T "copy" }}';
const copied_text = '{{ T "copied" }}';
const toggle_line_numbers_text = '{{ T "toggle_line_numbers" }}';
const toggle_line_wrap_text = '{{ T "toggle_line_wrap" }}';
const resize_snippet = '{{ T "resize_snippet" }}';
const not_set = '{{ T "not_set" }}';

These all fall back to the default language (usually English), no matter if they have been translated in i18n/*.toml.

@ltguillaume, this is because the scripts partial is cached, I will fix it now.

Aah, makes sense!

@ltguillaume, please test when you can if it's indeed fixed.

Just updated to b6a8bb2 but it isn't working for me yet.

Thanks for the feedback @ltguillaume. I think my fix is a little flawed, will refine it.

Thx. While you're diving into the rabbit hole called JavaScript anyway, perhaps a separation of scripts that have to be run asap (e.g. to fix #91) and those that can be bundled at the end of the page is in order?

Hi @ltguillaume, 64b50b6 should do it. Please check ๐Ÿคž๐Ÿผ

Sorry, it's still all in English ๐Ÿ™ˆ

@ltguillaume, can you remind me your repo URL? I need to test with that

Didn't see the fix in poiu-de@02119b2 before, can confirm it works now. Thanks!