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

Ka 2020 04 translate org fields #1799

Merged
merged 3 commits into from
Apr 6, 2020
Merged

Conversation

fuzzylogic2000
Copy link
Contributor

There are long explanations in the commits. Please read them separately.

…1768

It makes the buttons switch between the languages, and all languages
addable (if they aren't already there) and removable (if they are there)
on the plus-button.
The jQuery was there to choose the right language for the tabs, which
are in the html. So, currently if a language is removed that
was active on the tabs, The tab content is still shown, while no button
is active and the respective language is removed when saving.
…st-switch

My first thought was to move the tabs into the react component, but that
would have been a lot of effort. Instead (to make it slightly less
confusing), I added a second dropdown (-) to remove languages and use
the first dropdown (+) only add them.
this.props.languages.map(languageCode => {
this.props.languages.map((languageCode, i) => {
return (
<span key={languageCode}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@phillimorland I am a bit unhappy with returning an empty span for the languages that shouldn't be in the list, but couldn't think of a better way. (Apart from also having a list of the inactive languages in the state, but that would be a bit annoying to always update two lists, then.)

Copy link
Contributor

Choose a reason for hiding this comment

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

i think this is ok for now to be honest

Copy link
Contributor

@philli-m philli-m left a comment

Choose a reason for hiding this comment

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

I like the drop down and it's definitely working and displaying correctly :)

@philli-m philli-m merged commit 048dbc1 into master Apr 6, 2020
@philli-m philli-m deleted the ka-2020-04-translate-org-fields branch April 6, 2020 08:51
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