Prepare the plugin for localization
What problem does this address?
We decided to translate Feedzy to German and to achieve this, the following changes need to be applied to the plugin.
What is your proposed solution?
Localize all the strings
- Review all the strings within the PHP and JS files of the plugin to make sure they are fully localized and not hardcoded
- Implement the PHPCS sniff to check for translator comments in the code. Rule to be added:
WordPress.WP.I18n.MissingTranslatorsComment
Translate the Formbricks Survey
Reference: https://github.com/Codeinwp/neve/commit/cb3ec00dcaf38c4af58d82a213e5f0e38071a71d
Will this feature require documentation? (Optional)
No.
@Soare-Robert-Daniel, I have some questions here.
- [ ] 1. Should we translate such strings? I tried to see where the function is called, and found this occurrence, where the parameter passed to the function is the string 'Error 1'. Should we translate this string, or this is not visible to the users in the dashboard? 🤔
- [x] 2.The text on the Feedzy -> Support page, Documentation tab should be also translated considering how we did on Neve.
https://github.com/Codeinwp/feedzy-rss-feeds/blob/b44bf299e42e826512db8b791cc9400cfd1f4b6d/includes/layouts/feedzy-documentation.php#L21
- [x] 3. Feedzy -> Support -> Help us Improve!
The heading, text and button on this page aren't translated.
https://github.com/Codeinwp/feedzy-rss-feeds/blob/master/includes/layouts/feedzy-improve.php
- [x] 4. Feedzy -> Support -> Free vs Pro
The title and table content on this page are not translated.
https://github.com/Codeinwp/feedzy-rss-feeds/blob/master/includes/layouts/feedzy-pro.php
- [x] 5. Feedzy -> Support -> Getting Started
This page should be translated as well.
https://github.com/Codeinwp/feedzy-rss-feeds/blob/b44bf299e42e826512db8b791cc9400cfd1f4b6d/includes/layouts/feedzy-tutorial.php#L15
- [ ] 6. Editor.hs strings
https://github.com/Codeinwp/feedzy-rss-feeds/blob/1373e6960198304e9093e10d2df14de4b09a4ab3/js/FeedzyBlock/Editor.js#L489
The strings: by, on, at, in
- [x] 7.Inspector.js
https://github.com/Codeinwp/feedzy-rss-feeds/blob/1373e6960198304e9093e10d2df14de4b09a4ab3/js/FeedzyBlock/inspector.js#L58
This labels label: __('1 Hour') should be label: __('1 Hour','feedzy-rss-feeds'), right?
Same situation on: https://github.com/Codeinwp/feedzy-rss-feeds/blob/1373e6960198304e9093e10d2df14de4b09a4ab3/js/FeedzyBlock/inspector.js#L60
https://github.com/Codeinwp/feedzy-rss-feeds/blob/1373e6960198304e9093e10d2df14de4b09a4ab3/js/FeedzyBlock/inspector.js#L76
https://github.com/Codeinwp/feedzy-rss-feeds/blob/1373e6960198304e9093e10d2df14de4b09a4ab3/js/FeedzyBlock/inspector.js#L88
https://github.com/Codeinwp/feedzy-rss-feeds/blob/1373e6960198304e9093e10d2df14de4b09a4ab3/js/FeedzyBlock/inspector.js#L100
https://github.com/Codeinwp/feedzy-rss-feeds/blob/1373e6960198304e9093e10d2df14de4b09a4ab3/js/FeedzyBlock/inspector.js#L107
https://github.com/Codeinwp/feedzy-rss-feeds/blob/1373e6960198304e9093e10d2df14de4b09a4ab3/js/FeedzyBlock/inspector.js#L126
https://github.com/Codeinwp/feedzy-rss-feeds/blob/1373e6960198304e9093e10d2df14de4b09a4ab3/js/FeedzyBlock/inspector.js#L138
https://github.com/Codeinwp/feedzy-rss-feeds/blob/1373e6960198304e9093e10d2df14de4b09a4ab3/js/FeedzyBlock/inspector.js#L141
https://github.com/Codeinwp/feedzy-rss-feeds/blob/1373e6960198304e9093e10d2df14de4b09a4ab3/js/FeedzyBlock/inspector.js#L148
https://github.com/Codeinwp/feedzy-rss-feeds/blob/1373e6960198304e9093e10d2df14de4b09a4ab3/js/FeedzyBlock/inspector.js#L157
From https://github.com/Codeinwp/feedzy-rss-feeds/blob/1373e6960198304e9093e10d2df14de4b09a4ab3/js/FeedzyBlock/inspector.js#L161 To https://github.com/Codeinwp/feedzy-rss-feeds/blob/1373e6960198304e9093e10d2df14de4b09a4ab3/js/FeedzyBlock/inspector.js#L177
If the problem is valid, please review the whole file as there are many occurences.