Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ltguillaume opened this issue Feb 15, 2023 · 11 comments
Closed

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

ltguillaume opened this issue Feb 15, 2023 · 11 comments
Assignees
Labels
bug Something isn't working fixed

Comments

@ltguillaume
Copy link
Contributor

// 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.

@onweru onweru added the bug Something isn't working label Feb 16, 2023
@onweru onweru self-assigned this Feb 16, 2023
@onweru
Copy link
Owner

onweru commented Feb 21, 2023

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

onweru added a commit that referenced this issue Feb 21, 2023
Signed-off-by: weru <fromweru@gmail.com>
@ltguillaume
Copy link
Contributor Author

Aah, makes sense!

@onweru
Copy link
Owner

onweru commented Feb 21, 2023

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

@ltguillaume
Copy link
Contributor Author

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

@onweru
Copy link
Owner

onweru commented Feb 21, 2023

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

@ltguillaume
Copy link
Contributor Author

ltguillaume commented Feb 22, 2023

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?

onweru added a commit that referenced this issue Feb 28, 2023
Signed-off-by: weru <fromweru@gmail.com>
@onweru
Copy link
Owner

onweru commented Feb 28, 2023

Hi @ltguillaume, 64b50b6 should do it. Please check 🤞🏼

@ltguillaume
Copy link
Contributor Author

Sorry, it's still all in English 🙈

@onweru
Copy link
Owner

onweru commented Feb 28, 2023

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

@ltguillaume
Copy link
Contributor Author

Sure! https://codeberg.org/joinjabber/website-hugo

onweru added a commit that referenced this issue Apr 14, 2023
Signed-off-by: weru <fromweru@gmail.com>
@onweru onweru added the fixed label Apr 14, 2023
@onweru onweru closed this as completed Apr 14, 2023
hupfdule pushed a commit to poiu-de/compose that referenced this issue May 27, 2023
Signed-off-by: weru <fromweru@gmail.com>
@ltguillaume
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

2 participants