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

Adds the Polylang Pro plugin to Learn.WordPress.org #3049

Merged
merged 4 commits into from
Dec 3, 2024

Conversation

jonathanbossenger
Copy link
Collaborator

See #2284

@jonathanbossenger jonathanbossenger requested review from hlashbrooke and adamwoodnz and removed request for hlashbrooke December 2, 2024 10:18
@jonathanbossenger jonathanbossenger added the [Dev] Needs Review Pull request needing a review. label Dec 2, 2024
@jonathanbossenger jonathanbossenger linked an issue Dec 2, 2024 that may be closed by this pull request
@adamwoodnz
Copy link
Contributor

adamwoodnz commented Dec 3, 2024

I didn't get very far trying to test this. Activation didn't seem to run as expected and I now get an error Notice: Undefined index: default_lang in /var/www/html/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/include/links-directory.php on line 63

Might need to wipe my DB and start fresh unless you know an easy fix @sebastienserre?

@sebastienserre
Copy link

Hello,

Did you follow the wizard, which is automatically launched at activation?
You can follow it by going to the Languages > setup menu or creating some languages (at least one) & set it as the default language:
2024-12-03_07-29
https://polylang.pro/doc/configure-the-languages/#default-language

@adamwoodnz
Copy link
Contributor

Did you follow the wizard, which is automatically launched at activation?

Hi,

The wizard launched but something went wrong, and I think I know why now.

I've managed to fix the default language issue by deleting all languages and adding en_US back.

Now when I visit the wizard I can see that some frontend assets are missing (CSS and JS), so I think this caused my path through the wizard to fail.

Screenshot 2024-12-03 at 8 04 44 PM

@jonathanbossenger could you please check that all the files have been committed?

@jonathanbossenger
Copy link
Collaborator Author

Hi folks.

@adamwoodnz I was pretty sure everything was added, but when I checked the files you pointed out in your screenshot, PhpStorm warned me that I was viewing a file that was being ignored.

I manually compared what was committed to what was in the polylang-pro.zip, and I've added .gitignore exceptions for the css/build and js/build directories, as well as adding a .gitkeep file to the languages directory, so that directory gets committed as well.

I'm not sure why adding !/wp-content/plugins/polylang-pro to the .gitignore didn't also include the css/build and the js/build directories? I can only think that the /**/build directive higher up in the .gitignore might cause this.

To make sure, I then also ran a diff comparing the two directories and confirmed they both contain the same content (except for the languages/.gitkeep file, which is only added to git)

@jonathanbossenger
Copy link
Collaborator Author

Thinking about this further, the missing languages directory is probably why the initial activation failed, as it didn't have anywhere to store the language files.

@adamwoodnz adamwoodnz force-pushed the add/2284-polylang-pro-plugin branch from 22c6ebd to 0b3618c Compare December 3, 2024 19:21
@adamwoodnz adamwoodnz force-pushed the add/2284-polylang-pro-plugin branch from 930ecac to 3575482 Compare December 3, 2024 21:55
@adamwoodnz
Copy link
Contributor

I can only think that the /**/build directive higher up in the .gitignore might cause this.

Correct 🙂

I've added the frontend assets to this PR, now that they're not ignored, and the plugin seems to run as expected locally now. I haven't tested any specific translation functionality, but I trust that is working as desired.

I'll get this merged and deployed so we can activate it on https://learn.wordpress.org/test/, to start with.

Copy link
Contributor

@adamwoodnz adamwoodnz left a comment

Choose a reason for hiding this comment

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

LGTM

@adamwoodnz adamwoodnz merged commit e7303ed into trunk Dec 3, 2024
1 check passed
@adamwoodnz adamwoodnz deleted the add/2284-polylang-pro-plugin branch December 3, 2024 22:44
@kaitohm
Copy link
Contributor

kaitohm commented Dec 3, 2024

Thanks all! Let me know when this is committed, and I'll start testing on the test site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] i18n [Dev] Needs Review Pull request needing a review.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Test Polylang
4 participants