Open fredericalpers opened 1 year ago
@fredericalpers
=>We need to add a new table(table: see detail table below) to the database to detect the "language of page" when adding a new page.
Note: table wp_oo_plugin_detect_language_page detect_language_page_id (PRIMARY KEY), embed_shortcode_form_page_id (page id with embedded shortcode), locale
=> Do you agree with my solutions?
@dai-eastgate I will be able to give you feedback tomorrow, thank you :)
@dai-eastgate Please implement case 1 as suggested.
For case 2 we definitely want to support the most used multilingual plugins. Would it be easier for you to implement WPML first (WPML has priority since this is the plugin we are mostly using) and have a second issue for Polylang and maybe others later on/in the next milestones rather then implementing all at once?
@fredericalpers I will check and let you know soon.
@fredericalpers It will take me 5 days to implement and test for case 1 and the WPML plugin. Thanks!
@fredericalpers We have two solutions for "detecting language for page" Which Pages using the shortcode: Solution 1: We can add an option in the "onoffice > settings" as in the image below
=> detect language based on the "General settings of WordPress" or multilingual plugins (WPML, Polylang).
Solution 2: Detecting language allowed by prioritizing as follows: we will prioritize based on the multilingual plugin that the client installed. If no multilingual plugin is installed, we will detect by "Site Language" of "General Settings of Wordpress"
@fredericalpers Which solution do you prefer us to implement?
@dai-eastgate sorry for the late reply. We prefer solution 2.
Solution 2: Detecting language allowed by prioritizing as follows: we will prioritize based on the multilingual plugin that the client installed. If no multilingual plugin is installed, we will detect by "Site Language" of "General Settings of Wordpress"
Please go ahead and implement the suggested solution. Thank you :)
@dai-eastgate sorry for the late reply. We prefer solution 2.
Thanks! I will implement solution 2.
@fredericalpers Currently, I am checking issue #491 , which needs to be resolved before I can continue working on issue #575. Based on my estimation before, it is necessary to move the issue to the ramp-up week. Thanks!
@fredericalpers During implementation, I noticed the following problems: Problem 1: If no multilingual plugin is installed, we will detect by "Site Language" of "General Settings of WordPress" => Pages which are added by old users in different languages will only be detected as the current language ex: The current language which is set in "Site Language" of "General Settings of WordPress": English old users added "page English" in English old customers added "page Deutsch" in Deutsch => "page English", and "page Deutsch" will only be detected as pages added in "English language"
Because we can only handle the "add new a page" action and save it to the current language "wp_oo_plugin_detect_language_page" table in the database.
You can see the code.
=> There is no solution to this problem
Problem 2: Please provide me with the correct "Path to the plugin file relative to the plugins directory." of wpml. Currently, I am checking it like this "sitepress-multilingual-cms/sitepress.php". Is this correct?
Currently, we have completed 80% of this feature and are blocking the above 2 issues.
Please test the branch we are working on (35073-display-pages-that-use-the-shortcode-is-faulty) and give me your feedback. => We need 3 more days to be able to check this issue more specifically.
@fredericalpers When I tested on the master branch, I had the following states: I perform the following steps: Step 1: I create a new page, named as "list" and embed the [oo_estate view="list estate"] shortcode into the content of this page. => This page(named as "list") will be displayed in the "Pages using the shortcode" admin part of the estate list
Step 2: I delete that shortcode in content of this page(named as "list") => This page(named as "list") still be displayed in the "Pages using the shortcode" admin part of the estate list.
Please confirm: what attributes of a page will be displayed in the "Pages using the shortcode" admin part of the estate list?
According to my understanding: That page must have 2 attributes:
@fredericalpers Please confirm it for me so I can continue with the implementation. Thanks
@fredericalpers Please confirm it for me so I can continue with the implementation. Thanks
@dai-eastgate sorry, I will get back to you asap
Discussed in https://github.com/onOffice-Web-Org/oo-wp-plugin/discussions/530