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

[3.3] Drop translation of ContentType files … with a bonus #6802

Merged
merged 4 commits into from
Jul 11, 2017
Merged

[3.3] Drop translation of ContentType files … with a bonus #6802

merged 4 commits into from
Jul 11, 2017

Conversation

GwendolenLynch
Copy link
Contributor

@GwendolenLynch GwendolenLynch commented Jul 9, 2017

Background

There has been an ongoing debate in the internal team about the "correct" way to handle translation strings for ContentType files.

The debate has centred around data domains, as those of us (myself included for years) do not think they belong in app/config/contenttypes.yml. Personally, I still don't.

Problem 1

Language is hard. Structurally speaking, languages can be very different, and making assumptions of that structure in other languages using Proto-Germanic rooted languages as a base breaks pretty quickly. Ironically, other Proto-Germanic languages (e.g. Dutch) also break when making this base assumption.

tl;dr ContentType translations are invalid in both app/config/contenttypes.yml, and vendor/bolt/bolt/app/resources/xx_XX/contenttypes.xx_XX.yml

Problem 2

Our translation layer is in need of love. Currently maintenance is falling to @CarsonF and myself. The two of busiest/overloaded people in the project. We no longer have the bandwidth or desire to carry what has become a massive burden finishing of the general migration work on v3, brought about by it's release nearly a year before it was ready.

Problem 3

ContentType translations are currently only working "as intended". While debugging these changes in preparation for PR I found a bunch of places in our translation layer where ContentType strings are missing the currently implemented keyword.

Time to fix, and LoC changed, is significantly greater than simply removing & replacing. See "Problem 2".

Breaking changes

Visual … mostly.

ContentType translations are now handled by default via the name: & singular_name: keys in app/config/contenttypes.yml for that ContentType.

So where in a number of languages you can't now correctly handle things like pluralisation automatically, you can.

What about my translations?

@bobdenotter commented to me recently, that I have a very positive habit of taking things out and giving something better back in its place …

Localised translations can now be enabled in this branch!

To use, in your site project create app/translation/xx_XX/messages.xx_XX.yml or app/translation/messages.xx_XX.yml (all translations in the one directory) files

e.g.
local translations

Results in:
local translation result

@GwendolenLynch GwendolenLynch added this to the Bolt 3.3 - Feature release milestone Jul 9, 2017
bobdenotter
bobdenotter previously approved these changes Jul 9, 2017
Copy link
Member

@bobdenotter bobdenotter left a comment

Choose a reason for hiding this comment

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

Yup, totally in favor of this.

Copy link
Member

@bobdenotter bobdenotter left a comment

Choose a reason for hiding this comment

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

Still OK. 👍

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.

None yet

2 participants