Closed (fixed)
Project:
Internationalization
Version:
7.x-1.x-dev
Component:
Strings
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Feb 2012 at 22:22 UTC
Updated:
4 Jan 2014 at 01:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
webflo commentedA test to expose the issue. This should break.
Comment #3
webflo commentedComment #4
webflo commented1445344-broken-node-test.patch should fail.
1445344-fix-with-node-test.patch should pass.
Comment #6
webflo commentedits i18n_object_by_name().
Comment #7
jose reyero commentedI am not that sure about this. Maybe the problem is allowing a key instead of an object in i18n_object().
What about keeping i18n_object() as the object wrapper which always takes an object parameter and adding some other i18n_object_by_key() function ? (or i18n_object_build_key())
Comment #8
miro_dietikerObject id or key?
Comment #9
jose reyero commentedThis patch cleans up the i18n_object() API a little bit. I think part of the problem is using either object or object key as a parameter.
It also changes the default constructor for i18n_string_object(), not sure about this though.
Comment #10
webflo commentedThis looks good. I committed the whitespace for easier review and re-roll.
Hmm i think this should be $this->load_object($key). Right?
New patch is attached.
Comment #11
jose reyero commentedGreat, committed @webflo's version of the patch.
Also, tried the code at the top and it seems to work now.
I don't think we need anything else here, do we?
(Though I'm afraid tmgmt will need to keep depending on i18n-dev for now)