CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • com.cividesk.l10n.update gettextResourceDir
Pages: [1]

Author Topic: com.cividesk.l10n.update gettextResourceDir  (Read 838 times)

HanV

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 0
com.cividesk.l10n.update gettextResourceDir
February 06, 2017, 12:13:19 am
I have upgraded to the version 4.7.16 (Joomla, Windows10). After the upgrade I installed from github the extension l10n_update.

I get now rmessages  from l10n_update "Cannot read unrecognized property CRM_Core_Config::$gettextResourceDir."

Is this extension still in use? I have found it on github, after I read about it on the wiki as recommended for the translations. The property is used in the extension, but in the documentation it is marked als removed.
On the page https://wiki.civicrm.org/confluence/display/CRMDOC/Extensions#Extensions-Joomla the default location is <docroot>/media/civicrm/custom_ext. I think it must be <docroot>/media/civicrm/ext. That value is the default location in the application and that directory is present. But the installation of l10n_update was no problem.
HanV

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: com.cividesk.l10n.update gettextResourceDir
April 19, 2017, 06:02:39 pm
Hi,

Replying late, but there is activity in the l10n.update issue queue (dating to 2016):
https://github.com/cividesk/com.cividesk.l10n.update/issues/3

Can you test the patch and ping the issue?

Mathieu
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

HanV

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 0
Re: com.cividesk.l10n.update gettextResourceDir
May 15, 2017, 08:10:11 am
Sorry, i do not check these responses regulary.

I removed the extension two weeks after my post.
I have installed now the old extension from github with the change of johanv

 $l10n = $config->gettextResourceDir;    =>  $l10n = CRM_Core_I18n::getResourceDir();

After testing this patch, i think it is not enough.
The check to do only once a day the update is wrong. $delay is not the number seconds in one day.
The directory creation is done if the mo-file does not exists, not if the directory does not exists. 

See in the attachement the updated function l10nupdate_download.

The extension will now try to download
- https://download.civicrm.org/civicrm-l10n-core/mo/nl_NL/civicrm.mo
- https://download.civicrm.org/civicrm-l10n-extensions/mo/l10nupdate/nl_NL/l10nupdate.mo
(I have one single-lingual site with only Dutch)
The first file is downloaded and installed. The second file is missing, and local created empty.

The extension is very slow, if there are updates. There must be one problem with CRM_Core_Session::setStatus.
I have used this setStatus function (without  if (!empty($downloaded))) and i still get a timeout.
I think the code "Output a nicely formatted message" must be after the loop "foreach ($locales as $locale)"
But that won't solve the time-out, without the CRM_Core_Session::setStatus there is no time-out.

In the attachment my version (txt, because php is not allowed)
« Last Edit: May 15, 2017, 08:57:17 am by HanV »
HanV

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • com.cividesk.l10n.update gettextResourceDir

This forum was archived on 2017-11-26.