Giter Site home page Giter Site logo

Comments (9)

indigoxela avatar indigoxela commented on July 28, 2024 1

@laryn many thanks for testing!

Re metatag and fatal:

Did that happen when enabling the main i18n module or the i18n_node submodule?

Re clear caches:

Strange... I'll try to reproduce - it didn't happen to me.

Re Notice: Undefined property: stdClass::$language:

Many thanks for finding that missing language-langcode shuffle.
I hope, now we catched them all. 😉

But...
When debugging i18n_node_tokens(), the $options array looked like this:

array (
  'sanitize' => false,
  'clear' => true,
  'callback' => 'path_clean_token_values',
  'langcode' => 'en',
)

It's a string, not an object, at least when saving a node, I've updated my PR accordingly. Or did you see an object at some point?

from i18n.

indigoxela avatar indigoxela commented on July 28, 2024

I did some recherche.

In backdrop-ops/contrib#34 the module variable has been marked as obsolete (CMI in core), but that's only half of the truth, I guess.
In D8 variable has been dropped, leaving a gap for translatable variables.

I18n isn't the only module relying on variable, if looking at the install counts for Drupal:

  • i18n: 159,731 sites report using this module
  • variable: 201,051 sites report using this module

Looking at the above numbers, I guess we should port variable for compability reasons.

My question is: has this been discussed before?

from i18n.

docwilmot avatar docwilmot commented on July 28, 2024

My question is: has this been discussed before?

Dont think so. I get the impression that Variable Module isnt a necessary module even for sites using it. I think I usually just get rid of any code mentioning that module, and never missed it.

from i18n.

indigoxela avatar indigoxela commented on July 28, 2024

I usually just get rid of any code mentioning that module, and never missed it.

Sounds reasonable. Maybe the modules' install count is misleading. Mainly D7 i18n and domain module are depending on it and that could be done better/easier now with CMI, at least in i18n_node. I'll give it a try. 😉

from i18n.

indigoxela avatar indigoxela commented on July 28, 2024

So here's a PR.

It's mostly about i18n_node submodule ("Multilingual content")
The module installs and seems to work (mostly), but the PR sure needs more work.

All sorts of testing is welcome!

from i18n.

indigoxela avatar indigoxela commented on July 28, 2024

I believe, the Multilingual content submodule is fully working now. (Note: Simpletests aren't implemented yet)

How to test:

  • Enable only this submodule with its dependencies (some other submodules don't work yet)
  • Enable translations for a node type
  • Play with the node options on admin/config/regional/i18n/node
  • Play with the i18n node settings on admin/structure/types/manage/YOURTYPE
  • Inspect dblog for any errors

... and report any problems here.

from i18n.

laryn avatar laryn commented on July 28, 2024

My feedback:

  • I had metatag installed on the dev site I was testing on and got a fatal error when enabling i18n.
  • I had to clear caches to see admin/config/regional/i18n/node
  • Clicking around a bit I'm starting to see a lot of these: Notice: Undefined property: stdClass::$language in i18n_node_tokens() (line 34 of /path/modules/i18n/i18n_node/i18n_node.tokens.inc).

Other than that things look good so far!


Changing line 34 to this seems to work:

$langcode = isset($options['langcode']) ? $options['langcode']->langcode : i18n_langcode();

from i18n.

indigoxela avatar indigoxela commented on July 28, 2024

OK, regarding metatag:

When having metatag module enabled and enabling i18n_string submodule, I get:

Error: Call to undefined function ctools_include() in metatag_i18n_list_metatag_config() (line 134 of .../modules/metatag/metatag.i18n.inc).
So that's a bug in metatag.i18n.inc, ... ha!, you already reported it there. 👍

And I suspect, it was that fatal in module install that was causing your need to flush caches.

from i18n.

indigoxela avatar indigoxela commented on July 28, 2024

Two more commits and now I'm almost sure, that i18n_node works properly.

I fixed the broken content type (name, help...) translation and the weird call of language_list ( will fix issue #9).

Someone could merge this PR, I guess. 😉 (I really try to get around becoming an i18n maintainer, as this module needs so much more work and is complex...)

from i18n.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.