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

Convert Languages to CMI #175

Closed
jenlampton opened this issue Feb 7, 2014 · 3 comments · Fixed by backdrop/backdrop#534
Closed

Convert Languages to CMI #175

jenlampton opened this issue Feb 7, 2014 · 3 comments · Fixed by backdrop/backdrop#534
Assignees

Comments

@jenlampton
Copy link
Member

Languages need to save settings into a config file.

For reference, here is the parallel issue from drupal.org

@jenlampton jenlampton mentioned this issue Feb 7, 2014
28 tasks
@quicksketch quicksketch self-assigned this Nov 16, 2014
@quicksketch
Copy link
Member

I'm going to tackle this one next. Language and Locale settings contain our very last variables in the entire system, so in theory after this is complete we'll be 100% variable-free (some double-checking will be required).

@quicksketch
Copy link
Member

This is coming along well. Some of our previous variable rearrangement was in the wrong place, causing some confusion. I've converted everything except for locale_translation_plurals, which I'm not sure if it's config or state at this point.

The work-in-progress is at https://github.com/quicksketch/backdrop/compare/175/language_config. We should be able to finish this up this week.

@quicksketch
Copy link
Member

It looks like locale_translation_plurals is state, as it is set during string translation (currently still stored in the database). Since it only gets updated on database-driven data manipulation, that means it's stored in the database as well as state.

I encountered some more odd architecture while doing this conversion. It looks like when multiple language types (interface, content, URL) were introduced, Drupal started using the variable table as a sort of cache. This became apparent when converting to configuration that a bunch of the values we were saving weren't "config" at all. I've rewritten the way some functions retrieve these values, pulling directly from modules instead of managing the state of things in variables. This results in fewer things stored in configuration, and it treats configuration as what it should be. Unfortunately it also means that modules that provide language types or language negotiation handlers must be include in the early bootstrap. Considering in almost all situations this is going to be locale.module, language.module, and perhaps entity_translation.module (if we port/include that at some point) I don't think this is a blocker on the implementation.

Tests should be fully passing at this point. We have just one variable left in all of Backdrop, mail_system, which we have issue for at #416.

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 a pull request may close this issue.

2 participants