Tried to run Commons in different languages.

The 2 Commons variables are currently not translatable:

commons_anonymous_welcome_title
commons_anonymous_welcome_body

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

slowflyer’s picture

Currently the variables seemed not to be used at all...

The text:
Welcome to our community
Share your thoughts, find answers to your questions.

Is hardcoded in a panel pane.

japerry’s picture

Status: Active » Postponed

Currently commons only supports english, and we bypass the language selector upon install. For multilingual support, we would have to do a more indepth audit of the whole installer, which has lots of hardcoded english content.

slowflyer’s picture

I think that's not an issue of the installer...
The installer can stay in english and produce an english version ...

But if yout start making Commons multilingual after installation, it should be easier to do...

f.e. writing the welcome text to a node instead of a non translatable panel pane, would make it more easy.

jpontani’s picture

Status: Postponed » Needs review
FileSize
1.13 KB

Attached a patch that wraps the default values for variable_get in t().

slowflyer’s picture

The patch #4 seems not to solve the issue ...

  • t() function should be outside of variable_get() otherwise it doesnt help if the variables are defined
  • the variables are not used at the moment (#2)
jpontani’s picture

The variables are used in the panels config, and are set upon installation.

ezra-g’s picture

Component: Code » Installer
ezra-g’s picture

Status: Needs review » Reviewed & tested by the community

As I revisit this issue it seems the ultimate solution would be for the homepage text to be a piece of featurized content with proper translation.

However, t() seems like an acceptable stopgap given our future plans to provide featurized content, such as demo text.

ezra-g’s picture

Title: Localize Commons variables » Localize Commons homepage text
Devin Carlson’s picture

Assigned: Unassigned » Devin Carlson
Status: Reviewed & tested by the community » Needs review
FileSize
1.57 KB
85.13 KB
77.75 KB

Variable translation can be taken care of by declaring variables to the Variable module (a dependency of the Internationalization module).

The attached patch declares all of the Commons Site Homepage variables.

variable_translation.png
translation_interface.png

Devin Carlson’s picture

Version: » 7.x-3.2
Status: Needs review » Reviewed & tested by the community

Tested #10 by setting up a simple English + French Commons site and attempting to translate the homepage text using variable translation.

Devin Carlson’s picture

Status: Reviewed & tested by the community » Fixed

Committed #10 to Commons Site Homepage 7.x-3.x.

http://drupalcode.org/project/commons_site_homepage.git/commit/d5233f1

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.