YCHANGE-PROJECT / YCHANGE

0 stars 1 forks source link

Check out a few plugins #41

Closed pjotrsavitski closed 6 years ago

pjotrsavitski commented 6 years ago

Check those plugins and see if those could be useful.

Language Selector could help in allowing anonymous users to change the current language: https://github.com/ColdTrick/language_selector/releases Translation Editor could prove useful in updating translations within the interface itself (handling that by code could be too complicated): https://elgg.org/plugins/385116

pjotrsavitski commented 6 years ago

Language Selector seems to be working well enough. All of its features. The only issue is inability to choose the language to be shown. The plugin only allows setting the completeness percentage as a condition. We would just like a concrete list in our case. Changing that would require an overwrite of the default plugin functionality.

pjotrsavitski commented 6 years ago

Translation Editor seems to be working, although it seems to have some issues with caching (similar to those that could be found in the GitHub). The final translation files could be downloaded and placed into the codebase (and plugin itself removed).

It also seems to have the ability of disabling languages, that affects the list of available one on the Language Selector side.

This plugin is more complicated than the previous one. This means it should be extensively evaluated before making any choices.

One way to use it would be to temporary enable it, allow translations to be added. Then download all of those and place into the corresponding language file locations. This way, the UI would be fully translated and the plugin with any possible issues could be disabled.

pjotrsavitski commented 6 years ago

We would need to change the code of Language Selector, the part that determines the languages to be chosen from. The completeness percentage is not a good enough condition for our case.

The Translation Editor enables blocking of certain languages, but that produces misbehaves each time any translation is updated (through the UI). Suddenly showing all the languages, until the caches are cleared.

Estonian flag image is incorrect for both plugins. It has the correct image, but that one is named ee.gif not et.gif as it should be. Rewriting the latter with the correct one for both plugins should fix it.

This should do the trick.

pjotrsavitski commented 6 years ago

All the fixes applied locally within the server. Closing the issue.

pjotrsavitski commented 6 years ago

A fix is required in order to fix the issue of cached translations being deleted while anonymous user is visiting.

It is described in detail here: https://github.com/ColdTrick/translation_editor/issues/22

The current required code change involves function translation_editor_merge_translations, adding elgg_is_logged_in() as condition surrounding line $cache->delete("{$language}.lang");.

Resulring in:

if ( elgg_is_logged_in() ) {
    $cache->delete("{$language}.lang");
}