Closed (fixed)
Project:
Drupal Commons
Version:
7.x-3.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 Aug 2013 at 07:25 UTC
Updated:
4 Jan 2014 at 03:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
slowflyer commentedThis patch works for me...
Comment #2
devin carlson commentedI think that we should probably follow the language standards used by the core Locale module, namely:
I've attached a patch to implement the above.
@slowflyer The "Create a @bundle" text uses the translatable bundle label, so you should already be able to translate that. Have you tried using the Internationalization module to translate the names of your content types? Also, you should never run variables or user submitted text through the t() function. :)
Comment #3
ezra-g commentedThis patch look good to me on initial review. Would be great to get a functional review. Adding the 3.4 radar tag.
Comment #4
slowflyer commentedThe patch in #2 works fine.
@Devin Carlson: the bundle label has not been translatable for me with Internationalization installed.
The node-types were already translated and show up correct on node creation page.
Personally I would prefer to create the string in total first and than run it to t(). The current solution:
'Create a @bundle'
will create
'Create a document'
'Create a event' ... which should be 'Create an event'
running the complete string to t() will give us - at least in the other languages - the chance to display wording correct without constructs like 'Create a(n) document','Create a(n) event'.
Comment #5
slowflyer commentedNext things need to be fixed...
In:
commons_posts.module
commons_polls.module
commons_q_a.module
commons_wikis.module
Creation of partial node form is hard coded to (f.e. posts)
The result, all these nice things done here do not work.
Based on the suggestion in #2 to select a language or "LANGUAGE_NONE" I added a small function:
And replaced all:
$form['body'][LANGUAGE_NONE]
with:
$form['body'][community_box_language($form['#entity']->type)]
in the files mentioned above.
After that, everything works like in a fresh installed 3.3.
Comment #6
ezra-g commentedCorrecting the status.
Comment #7
devin carlson commentedAdding tag.
Comment #8
devin carlson commentedAn updated patch to address #5.
Comment #9
ezra-g commented#8 is committed. Thanks!
http://drupalcode.org/project/commons.git/commit/d4c7518