Skip to content

feat: support different workshop languages. #53

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Obersand
Copy link
Contributor

All events contain an output "language_code" set by one of the following:

  • An optional "language_code" key in the scraper configuration. The configuration for Switzerland gains a few workshops, for example Digital Collage in English and Digital Puzzle in German.

  • The scraper extracts the language from the event page for the ticketing platforms that support it, such as Climate Fresk.

If all else fails, the fallback is "fr" for French.

Add an utility to convert the human string for a language (ex: "German") to its language code, and a new FreskLanguageNotRecognized error.

All events contain an output "language_code" set by one of the following:

* An optional "language_code" key in the scraper configuration. The configuration for Switzerland gains a few workshops, for example Digital Collage in English and Digital Puzzle in German.

* The scraper extracts the language from the event page for the ticketing platforms that support it, such as Climate Fresk.

If all else fails, the fallback is "fr" for French.

Add an utility to convert the human string for a language (ex: "German") to its language code, and a new FreskLanguageNotRecognized error.

Signed-off-by: Jeffrey Belt <[email protected]>
@thomas-bouvier thomas-bouvier self-requested a review April 18, 2025 20:36
@thomas-bouvier thomas-bouvier marked this pull request as draft April 19, 2025 09:40
@Obersand Obersand marked this pull request as ready for review April 20, 2025 08:48
@Obersand Obersand changed the title Add support for different workshop languages. feat: support different workshop languages. Apr 21, 2025
Copy link
Member

@thomas-bouvier thomas-bouvier left a comment

Choose a reason for hiding this comment

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

The logic looks good to me. However I'm wondering about certain data sources: will these links host new events in the future?

…events (even if recurring).

Signed-off-by: Jeffrey Belt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants