-
Notifications
You must be signed in to change notification settings - Fork 8
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
Festival: translation of contributions and some other improvements #341
Draft
matthijskooijman
wants to merge
12
commits into
master
Choose a base branch
from
festival-translation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
matthijskooijman
force-pushed
the
festival-translation
branch
2 times, most recently
from
September 1, 2020 16:14
aa7af48
to
a8cd575
Compare
6 tasks
This returns a list of all the languages for which this page is defined (i.e. has an entry in hypha.xml).
This just adds code to render the page, editing must be done manually.
This just adds code to render the headers, editing must be done manually.
This allows passing a language parameter to the getConfigElement helper, to retrieve a translated value.
This no longer reads the forms from the config elements directly, but looks for a language subtag with the right id. Note that this does not allow the contributions themselves to be translated yet, just the displayed form. Also note that this breaks compatibility, without some form of migration, any custom forms will become unused.
This moves most attributes on the contribution tag to new language subtags, allowing to specify most things for multiple languages. The contribution form can now be displayed in different languages, which then also edits the selected language. The timetable and lineup views now also have a language selector, causing all contributions to be displayed in the selected language (if available, falling back to another language otherwise). This introduces a new FestivalContribution class that simply wraps the contribution XML node, adding some methods to access translated attributes and subtags.
matthijskooijman
force-pushed
the
festival-translation
branch
from
September 2, 2020 10:24
26d9fc0
to
d693a40
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I did some rough work to make contributions translatable. We discussed doing this along with #131 (external event datatype), but for simplicity and speed, I've just done the translations, still storing them inside the festival page XML, cutting some corners to make this usable for Expo Keerpunt first.
This PR also has code for other things that are currently in use on expokeerpunt.nl, but not merged here yet: An about page, customizable headers above the timetable and lineup and showing some command buttons to non-logged in users. Also, the first three commits here come from #340, so can be ignored here.
Some caveats I found while implementing this: