-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Translation #6
Comments
@jbonlinea no idea sorry, will happily accept your efforts to implement translation for this plugin. |
Hi, One question. Where do the text actually displayed by the shortcodes (let's narrow it to the member shortcode) comes from ? I mean do your plug-in has any text or string that are displayed on the front end, or 100% of what is displayed comes from Civi strings ? Knowing this will help to figure what could be translated and where from. Regards |
@jbonlinea might want to read this page, https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/ |
@agileware-justin I think @jbonlinea means that the plugin's |
@agileware-justin There are two ways this can be done:
|
We will happily accept any PRs / submissions to set up translation for this plugin. |
Hi, Well I meant two thing, one like @christianwach outlines above, and the other is what part of the "text/data" displayed by the shortcode is comming from civicrm and what could be translated in a .po file ? for instance [ux_membership_type] : returns exactly the civi membership type label, while [ux_membership_expiry] return "Your membership expires on décembre 31st, 2021". On this second example is "Your membership expires on" comming from your plug-in and "décembre 31st, 2021" from civi, or your plug iget the the expiry date from civi and format it berore placing it into the whole string ? I won't address this at right now as there are more critical things to address first, and I'm know thinking that one could get the value with the data processor and format it or place it in a phrase as he wants so there may already be a working and flexible solution for all :) |
@jbonlinea Unfortunately, that string isn't translatable at all because it's hard-coded in the plugin. The code should read: $membership_summary_message .= '<div>' . sprintf( __( '%1$s member - %2$s. Your membership expires on %3$s', 'civicrm-ux' ), $membership_types, $membership_summary_status, $end_date_format ) . '</div><div>' . '<a href="' . esc_url( $summary_show_renewal_URL ) . '">' . __( 'Click here to renew your membership', 'civicrm-ux' ) . '</a></div>'; You're going to have to apply the same kinds of changes to all the text in this plugin in order to translate it into French. |
Yeah, well the point was to have translations to used both french and english ; and I could have provided the french translations at least, and eventually a couple others with some quick review. English will do for the time being |
Hi,
I'm on the way to use this plug-in and consider translating it to french, however language/civicrm-ux.pot is empty so I wonder what are the chains that may be translatable ?
Regards
The text was updated successfully, but these errors were encountered: