This patch allows translation of schemes.

CommentFileSizeAuthor
translation_selection.patch1.2 KBhass

Comments

Zen’s picture

I don't think that this will work. Have you tried running this past the po generator / checker script? Does it actually get translated? I doubt it.

-K

hass’s picture

not with the PO extractor.php, but it works... and i'm able to translate the names with the locale module by hand or with a hack... (placing a textfile anywhere containting t() with all names i'd like to translate and run extractor.php on it)

Zen’s picture

Sounds dodgy. How do other modules/translators approach this?

-K

hass’s picture

i don't know for sure :-). maybe you'd like to add a feature to allow preconfigured node styles. i created a installer profile and imported the profiles. named them in english... and tried to translate the names...

// Preconfigure Node_Style with YAML Themes
_node_style_add_scheme('1 column', array ('display' => array ('node' => array(), 'page' => array()), 'misc' => array('theme' => 'yaml_1col', 'head' => '')));
_node_style_add_scheme('2 column, left sidebar', array ('display' => array ('node' => array(), 'page' => array()), 'misc' => array('theme' => 'yaml_2col_left', 'head' => '')));
/* Helpfile for creating the POT for YAML node_style's */

t('1 column');
t('2 column, left sidebar');

there should be a better way to get the translated names inside... but without the t() around the strings i don't know how the UI translation should be done. therefor the above is only a way to get the translation and the style config inside drupal.

Zen’s picture

Status: Needs review » Closed (won't fix)

The general consensus is that this is not recommended or going to work in general cases.

-K