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

dev/translation#90 address translation issue on membership #31299

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

A brief description of the pull request. Keep technical jargon to a minimum. Hyperlink relevant discussions.

Before

What is the old user-interface or technical-contract (as appropriate)?
For optimal clarity, include a concrete example such as a screenshot, GIF (LICEcap, SilentCast), or code-snippet.

After

What changed? What is new old user-interface or technical-contract?
For optimal clarity, include a concrete example such as a screenshot, GIF (LICEcap, SilentCast), or code-snippet.

Technical Details

If the PR involves technical details/changes/considerations which would not be manifest to a casual developer skimming the above sections, please describe the details here.

Comments

Anything else you would like the reviewer to note

Copy link

civibot bot commented Oct 15, 2024

🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷

Introduction for new contributors...
  • If this is your first PR, an admin will greenlight automated testing with the command ok to test or add to whitelist.
  • A series of tests will automatically run. You can see the results at the bottom of this page (if there are any problems, it will include a link to see what went wrong).
  • A demo site will be built where anyone can try out a version of CiviCRM that includes your changes.
  • If this process needs to be repeated, an admin will issue the command test this please to rerun tests and build a new demo site.
  • Before this PR can be merged, it needs to be reviewed. Please keep in mind that reviewers are volunteers, and their response time can vary from a few hours to a few weeks depending on their availability and their knowledge of this particular part of CiviCRM.
  • A great way to speed up this process is to "trade reviews" with someone - find an open PR that you feel able to review, and leave a comment like "I'm reviewing this now, could you please review mine?" (include a link to yours). You don't have to wait for a response to get started (and you don't have to stop at one!) the more you review, the faster this process goes for everyone 😄
  • To ensure that you are credited properly in the final release notes, please add yourself to contributor-key.yml
  • For more information about contributing, see CONTRIBUTING.md.
Quick links for reviewers...

➡️ Online demo of this PR 🔗

@civibot civibot bot added the 5.79 label Oct 15, 2024
Copy link

civibot bot commented Oct 15, 2024

The issue associated with the Pull Request can be viewed at https://lab.civicrm.org/dev/translation/-/issues/90

@@ -116,13 +116,9 @@
{if !empty($auto_renew)} {* Auto-renew membership confirmation *}
{crmRegion name="contribution-thankyou-recur-membership"}
<br />
{if !$installments || $installments > 1}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only thought here @eileenmcnaughton I wonder is if $installments is always being assigned to the template or not

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seamuslee001 yeah - I'm confused - I'm thinking it maybe is not - but note that if it is NOT assigned there is still text rendered - it's just that there is

<strong>{ts 1=$frequency_unit}This membership will be renewed automatically every %1.{/ts}</strong>

vs the per-unit version

& it seems like the per unit version is generally preferred

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also a problem with

<strong>{ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 %2(s).{/ts}</strong>

that seems to be pushed out - I don't know whether you can use the plural whatsit & have day translate to days in English - that seems like it has been left out of scope over a few iterations

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I read this right, the every %1 %2(s) that is still there only affects when a limit is set on the number of instalments, which presumably is not used much.

Ideally it should use the same pattern as for unlimited instalments, with the if/elseif for day/week/month/year (but that's outside the scope of this PR).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mlutfy I pushed in an addition fix for that - if it looks good I suggest we merge this to the rc but only back port the original patch to 5.78

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eileenmcnaughton Looks good to me, thanks! I added merge-ready based on the feedback from Samuele on Gitlab (he had also worked on the initial fixes around this).

The (s) pattern doesn't work for translation
@mlutfy mlutfy added the merge ready PR will be merged after a few days if there are no objections label Oct 15, 2024
@mlutfy
Copy link
Member

mlutfy commented Oct 16, 2024

I tested a few scenarios and seems all OK. It was on Standalone, with PHP notices enabled, latest Smarty, etc.

Before:

image

After:

image

Contribution Page ThankYou with a number of instalments:

image

Contribution Page ThankYou with no limit of instalments:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.79 merge ready PR will be merged after a few days if there are no objections
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants