-
Notifications
You must be signed in to change notification settings - Fork 1
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
Biography in French profile displayed in English #25
Comments
@fjjulien Yes, the As the staging membership doesn't include Rhodnie as a member, changes to his profile must be done on the production side. There I see a FR bio is included in his There's a PR for the usermeta plugin which includes the addition of "description_fr". But the FR bio doesn't appear even after I manually added that field to the staging plugin as a test. @saumier I don't think that PR will resolve the issue so any idea where the issue could lie? |
@dugost @fjjulien The french description is not showing in the Wordpress Users API. I looked at both www.capacoa.ca and in test.capacoa.ca for any 'description_fr' fields and found none for any user (even test user "Ryan13".) @dugost I made an official release of the usermeta plugin. There is no point in doing anything further with the shortcode plugin or Artsdata until the description_fr appears when you call the Wordpress User API in test or production. For me to continue the "description_fr" must appear in one of these pages: @dugost I'll need your help as this is internal to the way the forms collect "description_fr" and store it in a Wordpress database field. I don't know how that works. If you can find a way to add the missing description in french to the Wordpress Users API then I can take it from there.
|
I have assigned this issue to @dugost as I am blocked until the description_fr appears. |
@dugost Please allocate no more than 30 minutes at exploring solutions to this issue. Using a bunch of different WP Plugins to generate open data and content is really not an optimal open data publication strategy. Instead of investing several development hours to extract these French descriptions from CAPACOA's site, I would rather invest these resources into exploring alternative but more robust methods of publishing and using open descriptions in multiple languages. Here are examples of alternative sources that we could use :
It would make more sense to invest energy in this kind of data reuse, than in generating our own open descriptions that no one else will use. Recap: Any 30 minutes of debugging. If no solution is found, I will accept the CAPACOA individual member profiles deliverable "as is", with descriptions only displayed in English. |
@saumier @fjjulien I didn't realize Polylang wasn't including the 'description_fr" field with the REST API. I thought it was pulling values from any specified field existing in the A quick search suggests that this API functionality is only available with Polylang Pro. I did find this third-party function that might solve it without the need for PLPro but I don't know enough about this right now. As bios are managed internally, I added 'bio_english' and 'bio_french' as admin-only fields to the PMP set-up. If you look at the Ryan13 test user again, you'll find this sample content being output:
If the plugin can display a field depending on the current language, these fields can be used without the need for any other plugins and be managed like any other PMP member data. If this has approval, I'll submit a PR with my revisions and I can move the bios for Richard and Rhodnie on the production site to these new fields. |
@dugost This is a simple and robust solution. The only disadvantage is that we can't expand it to other languages, without lengthening the admin interface but we don't have immediate plans for adding other languages. Please implement it. |
@dugost Please name these two new fields Regarding the field labels in the admin interface, I would suggest "Member Description - English" and "Member Description - français". |
@fjjulien Ok, great. I've added it to the staging site and test user Ryan13 is displaying sample text for both. To differentiate the fields from the default WordPress biography "description" and the one from Polylang "description_fr", I've labelled these PMP fields "member_description_en" and "member_description_fr". I also changed the formatting to "Member Description (English)" and "Member Description (français)" to be consistent with other fields. I can revert to hyphens, if you prefer. About to submit a PR so these fields and the 'MemberTerminationDate' field required for #24 are included in the latest code. Would you like this added to the production site or wait until Gregory has had a chance to review it and ensure this method will work properly? |
@dugost Please implement them straight on the production site. Unless I am mistaken, Gregory is only extracting data from the production site anyway. Brackets are absolutely fine for field labels. |
@fjjulien Done. |
@dugost The new description fields in metadata will work. But before I update the shortcode, let me know when those new fields are working in production (www.capacoa.ca). To check, here is a link to the data in production that gets loaded into Artsdata. Click this link and search in your browser for Rhodnie Désir. |
@saumier Yes, they do work. Adding those 3 new fields to the production plugin outputs In case it's helpful when searching for members with special characters in their names: searching for 'Rhodnie Désir' gives no result since the é is output as Unicode ( |
@dugost Thx. Can you add an individual member's english and french description to "member_description_en" and "member_description_fr" in production so I can test the shortcode? |
@fjjulien Thx. I will make the change to the shortcode plugin and test. |
@fjjulien @dugost I have released shortcode plugin v1.4.4 with support for bilingual biographies. Please install in test, check out the bio of Rhodnie Désir, and if all looks good deploy to production. |
Great. Thx. I am closing this issue. |
English profiles of individual members are looking fine: https://test.capacoa.ca/en/member/directory/profile/?uri=http://kg.artsdata.ca/resource/K14-139
French profiles of individual members are almost perfect too, except for the fact that the biography text is in English : https://test.capacoa.ca/fr/membre/repertoire/profil/?uri=http://kg.artsdata.ca/resource/K14-139
@dugost The translations of wp_users descriptions are handled by the Polylang plugin, aren't they? Can you please check that this translation is being extracted and loaded to Artsdata?
Once you are confident that the translation strings are extracted, please pass this issue on to Gregory so he can resolve it.
The text was updated successfully, but these errors were encountered: