Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-19802 - Fix translated strings in tpl #9581

Merged
merged 1 commit into from
Dec 28, 2016

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Dec 27, 2016

@colemanw
Copy link
Member Author

@civicrm-builder retest this please

@totten
Copy link
Member

totten commented Dec 27, 2016

+1

FWIW:

  • I was wondering about whether there was a way to handle the Javascript ts('...') snippet generically (like we do in Angular *.html files)... it may be feasible for civistrings to extract calls to ts(...) from *.tpl files, but... at runtime... I don't think there's a simple way to populate CRM.strings with the right translations. (You'd have to understand the different flows for loading *.tpl.)
  • Based on grep, there are a few other files which look to have suspicious ts(...) calls inside Smarty content. These shouldn't block 9581 but may be similar issues:
    • templates/CRM/Campaign/Form/Task/Interview.tpl
    • templates/CRM/Contribute/Form/Contribution/Main.tpl
    • templates/CRM/Event/Form/EventFees.tpl
    • templates/CRM/Event/Form/SelfSvcUpdate.tpl
    • templates/CRM/common/enableDisableApi.tpl
    • templates/CRM/common/navigation.js.tpl

@colemanw
Copy link
Member Author

@totten Right, it's not just a matter of extracting the civistrings it's also a matter of adding the strings into the DOM.
When to use ts() vs {ts} is confusing but I have documented it.

@colemanw colemanw merged commit 408fbd4 into civicrm:master Dec 28, 2016
@colemanw colemanw deleted the CRM-19802 branch December 28, 2016 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants