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

PB-227: Helptext translations #76

Merged
merged 16 commits into from
Aug 30, 2024
Merged

Conversation

LukasJoss
Copy link
Contributor

No description provided.

@LukasJoss LukasJoss force-pushed the feat-PB-227_helptext_translations branch 2 times, most recently from aa5abb7 to 1304b40 Compare January 22, 2024 13:34
@LukasJoss LukasJoss requested review from rebert and hansmannj January 22, 2024 13:40
@LukasJoss
Copy link
Contributor Author

LukasJoss commented Feb 1, 2024

the docker image has been changed and no longer contains the babs2 images see https://github.com/geoadmin/infra-kubernetes/commit/df73499cb5235fd65b12ae53c918c5212a5a10bf

@LukasJoss LukasJoss force-pushed the feat-PB-227_helptext_translations branch from 80b262c to aaa4528 Compare August 23, 2024 14:43
@LukasJoss LukasJoss force-pushed the feat-PB-227_helptext_translations branch from 1082664 to 98eeefd Compare August 23, 2024 15:48
@LukasJoss LukasJoss force-pushed the feat-PB-227_helptext_translations branch 4 times, most recently from b9d657d to 475bf57 Compare August 27, 2024 11:56
@LukasJoss LukasJoss requested review from hansmannj and rebert and removed request for rebert and hansmannj August 27, 2024 12:22
@LukasJoss LukasJoss force-pushed the feat-PB-227_helptext_translations branch from 475bf57 to 363ded7 Compare August 28, 2024 13:18
@LukasJoss LukasJoss requested a review from hansmannj August 29, 2024 11:23

Args:
icon_set: (IconSet) the icon set in which belongs the icon we want
icon_name: (str) the name of the icon
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently only icon_set is an argument

Copy link
Member

@hansmannj hansmannj Aug 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbd @pakb @LukasJoss : Do we want to check the existence of keys in the dict for all languages here, or in the front-end?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably front-end could handle the case when a certain language is missing in the returned dict, by simply skipping the mouseover text in that case

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would probably need to define first which languages are required in the first place, but handling it on the front-end is probably fine

@@ -0,0 +1,582 @@
{
"001-I-Danneggiamento": {
"de": "Besch\u00e4digung",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the encoding correct? Will this be correctly handled by the front-end?

json_dic[string_id] = icon_dic

with open(
destination + '-' + filename[-1] + '-dictionary.json', "w", encoding='utf-8'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, utf-8 should do I guess

def get_icon_description(icon_name='', icon_set=''):
'''
Return json containing the description in all available languages for the specified icon of the
provided icon set
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

of the provided icon, not icon set


def find_descripton_file(icon_set):
'''
Return file path of description file if it exists
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add or False in case it doen't

Copy link
Member

@hansmannj hansmannj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot 🚀
Just a few small comments

@LukasJoss LukasJoss force-pushed the feat-PB-227_helptext_translations branch from 1acf2ae to 899ef84 Compare August 30, 2024 13:03
@LukasJoss LukasJoss force-pushed the feat-PB-227_helptext_translations branch from 899ef84 to e1dfd45 Compare August 30, 2024 13:26
@LukasJoss LukasJoss changed the title PB-227 Helptext translations PB-227: Helptext translations Aug 30, 2024
@LukasJoss LukasJoss merged commit 32d84df into develop Aug 30, 2024
6 checks passed
@LukasJoss LukasJoss deleted the feat-PB-227_helptext_translations branch August 30, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants