Translation issueshttps://lab.civicrm.org/dev/translation/-/issues2020-03-25T04:34:05Zhttps://lab.civicrm.org/dev/translation/-/issues/40Can't install 5.23 in another language2020-03-25T04:34:05ZDaveDCan't install 5.23 in another language5.23.3 drupal 7
Also affects 5.24
Also reported on Stackexchange for wordpress by two separate people (but it's a bit buried inside another question https://civicrm.stackexchange.com/questions/35014/local-flywheel-wordpress-install-with...5.23.3 drupal 7
Also affects 5.24
Also reported on Stackexchange for wordpress by two separate people (but it's a bit buried inside another question https://civicrm.stackexchange.com/questions/35014/local-flywheel-wordpress-install-with-civicrm)
You get a white screen and the apache error log has a truncated stack trace:
```
PHP Fatal error: Uncaught RuntimeException: Undefined constant: CIVICRM_TEMPLATE_COMPILEDIR in http://example.org/sites/all/modules/civicrm/CRM/Utils/File.php:583
Stack trace:
0 http://example.org/sites/all/modules/civicrm/Civi/Core/Paths.php(65): CRM_Utils_File::baseFilePath()
1 [internal function]: Civi/Core/Paths->Civi/Core/{closure}()
2 http://example.org/sites/all/modules/civicrm/Civi/Core/Paths.php(145): call_user_func(Object(Closure))
3 http://example.org/sites/all/modules/civicrm/Civi/Core/Paths.php(228): Civi/Core/Paths->getVariable('civicrm.private', 'path')
4 http://example.org/sites/all/modules/civicrm/Civi/Core/Paths.php(82): Civi/Core/Paths->getPath('l10n')
5 [internal function]: Civi/Core/Paths->Civi/Core/{closure}()
6 http://example.org/sites/all/modules/civicrm/Civi/Core/Paths.php(145): call_user_func(Object(Closure))
7 [useless since it's truncated] in http://example.org/sites/all/modules/civicrm/CRM/Utils/File.php on line 583, referer: http://example.org/sites/all/modules/civicrm/install/index.php
```5.24.0https://lab.civicrm.org/dev/translation/-/issues/37Ancient switch statement that provides hardcoded translation doesn't do anyth...2020-02-24T16:28:47ZDaveDAncient switch statement that provides hardcoded translation doesn't do anything anymore@bgm FYI since you might find this academically interesting since it's like "Translation Archaeology".
These lines do nothing: https://github.com/civicrm/civicrm-core/blob/5.22.1/CRM/Activity/Selector/Activity.php#L397-L420
Except for ...@bgm FYI since you might find this academically interesting since it's like "Translation Archaeology".
These lines do nothing: https://github.com/civicrm/civicrm-core/blob/5.22.1/CRM/Activity/Selector/Activity.php#L397-L420
Except for a code-format whitespace change, these lines are unchanged from when they were added 13 years ago and predates the concept of option value labels and was likely added when translation capability was first being added. The comment even still says "DRAFTING".
In particular note that $row['activity_type'] here is the `LABEL` for the option value. **So this switch() doesn't do anything.** Here's a table:
| Scenario | Effect of the switch() |
|------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| US English | Does nothing |
| UK English, labels and names are the same | Does nothing |
| UK English, labels and names are different | Almost never does anything (see next scenario) |
| UK English, but for example the label for activity type Meeting has been changed to Email. I don't know why anyone would do that though. | It would translate Email to Email since it's english, so still does nothing. |
| Non-english, and the label is non-english. | Does nothing |
| Non-english, but you've for some reason changed the label for e.g. Email back to english. But why would you do that? | It will translate it, but in this situation that's a bug because you changed the label to english on purpose because you wanted english, for whatever reason. |
Extra
-----
What's also interesting but is a separate TODO that I'm not going to look closer at right now: I'm not 100% sure when this code even runs. You can trigger it by visiting manage case if the client has some non-case activities, but I don't know why it's even retrieving those non-case activities when you're looking at manage case. And the function is NOT called when looking at a contact's activity tab. It does NOT run when showing results for an activity search.
For manage case it's called from Case_Page_Tab which calls Core_Select_Controller(output = SESSION).
Note that getRows isn't returning any case activities, just the non-case ones. The actual rows you see on manage case come from CRM/Case/Form/ActivityTab.tpl via ajax call to civicrm/ajax/activity, which is CRM_Activity_Page_AJAX::getCaseActivity()5.24.0