Problem/Motivation

When using Olark module on multilingual site with multiple languages enabled it shows default values for chat elements in english for all languages enabled on the site. There is no option to translate the text that is shown in chat box.

Optional: Provide an easy way to change the text shown in chat box (placeholders, title, etc.).

Proposed resolution

Use locale options provided by Olark to modify strings used for chat box. Add a variable to store all configuration and make variable multilingual using Variable translation.

Remaining tasks

Port changes to Drupal 8.

User interface changes

Added a new text area to admin settings form that stores extra settings.

API changes

None.

Data model changes

None.

Comments

SurfinSpirit created an issue. See original summary.

apugacescu’s picture

StatusFileSize
new7.9 KB
apugacescu’s picture

Assigned: apugacescu » Unassigned
Status: Needs work » Needs review
apugacescu’s picture

Issue summary: View changes
joelpittet’s picture

Status: Needs review » Needs work

Thank you for the patch.

You shouldn't be using t() on hook_menu() items from the docs: https://www.drupal.org/node/323101

The JS locale in the docs would need to keep tabs with things they change upstream so I'm not sure if we should do that...

Any reason you don't just chuck that code in the "Olark code" box?

boyan.borisov’s picture

Useful patch indeed.
Thank you, @SurfinSpirit.

I guess the reason to have the new olark_extra_settings is to keep the JS that should be localized separatly from that JS which shouldn't...but I also think that is a kind of overhead. lets keep everything in olark_settings and to make it i18n variable. I think will make the settings less confusing too for the people which already use the module.

apugacescu’s picture

StatusFileSize
new2.48 KB

Did proposed modifications, attaching new patch.

The idea behind a separate variable is to keep the code provided by 'Olark installation' vanilla, but I agree having two variables can be confusing.

apugacescu’s picture

Status: Needs work » Needs review
joelpittet’s picture

Sorry for the delay, this looks good. Could we move the variable module stuff into olark.variable.inc? That way it's nice and separated and really only loaded if the variable module is installed.

apugacescu’s picture

StatusFileSize
new2.55 KB

Moved variable related functionality to a separate file based on https://www.drupal.org/project/variable

@joelpittet thanks for noticing this.

joelpittet’s picture

Status: Needs review » Fixed

Thanks @SurfinSpirit, I've committed this to the 7.x-1.x-dev branch.

Status: Fixed » Closed (fixed)

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