Automattic / camptix

Moved to https://github.com/WordPress/wordcamp.org/
176 stars 94 forks source link

Add support for language packs #154

Closed juanfra closed 7 years ago

juanfra commented 8 years ago

Add support for language packs

Issue #146

iandunn commented 8 years ago

I didn't think the Text Domain and Domain Path headers were necessary anymore, and we could probably just delete the files in languages since they were imported to w.org, right?

I haven't looked closely at the migration steps, though, so I could be wrong about all of that.

juanfra commented 8 years ago

I guess using the Textdomain and Domain Path headers is a convention, or at least it is described in the i18n docs - But honestly, I am not sure if they are required at this point. I thought they were.

Regarding the files in the languages/ folder, I'm not sure if keeping them will automatically import/update the different catalogues in the translate.wp.org project - (haven't found any interesting read about it, perhaps some of the WooCommerce or Jetpack devs know this, as they already gone through the process of making the plugin compatible with dot org translations).

juanfra commented 8 years ago

Ok, I've found this:

Keep in mind, your plugin’s textdomain must match its slug and, as mentioned above, to fully support language packs, you’ll want to remove translations from your plugin after the import, when language packs are going out (language packs go out as soon as a translation is at 100%).

juanfra commented 8 years ago

From what I've seen, and making an assumption the catalogues will not be imported until the plugin is compatible with wp.org translations. I'd leave the files until having the translations imported over wp.org and remove them in a future release. Sorry for the last commit & revert.

iandunn commented 8 years ago

Huh, it looks like nothing was imported. I thought that happened automatically when the feature launched on w.org.

Do you see any reason why CampTix isn't compatible right now? The slug and text domain match.

juanfra commented 8 years ago

Yep. I guess that once the plugin becomes compatible it will import the catalogues and they can start being managed over there.

The main reason I see is that the load_plugin_textdomain() call is not part of a function attached to the plugins_loaded action hook.

ePascalC commented 7 years ago

I should have probably added it here instead of creating a new pull request, but only checked the pending ones now :-( sorry ! Please see https://github.com/Automattic/camptix/pull/160 (I try to keep my own QRG up-to-date on http://wp-info.org/pa-qrg/)

juanfra commented 7 years ago

Hi Pascal,

Thanks for taking a look at it and for your PR. Unfortunately as far as I know by only adding the textdomain within the headers is not enough. Please check this article: http://ottopress.com/2013/language-packs-101-prepwork/

I guess until we don't merge the changes and sync the org version with github we won't be able to handle translations via dot org.

Cheers.

ePascalC commented 7 years ago

Hi, Will have a look at the article, but I still think that much more people can be reached by already adding it onto translate.wordpress.org and then from time to time making an export there. Every week more contributors and translation editors are arriving on the centralized translate so I think it should be THE place for translation. Not everybody can create a pull request on GitHub that easy, but creating an account on w.org and then using the web interface might be easier to attract more people.

So my advice: Switch to translate and then 'back copy' from there !

Pascal.

juanfra commented 7 years ago

Hi Pascal,

Thanks for the follow up.

Yes, we certainly agree that the place where translations should be is wp.org, that's the whole point behind this issue + PR. As soon as the changes are merged + Synced with the version in wp.org the translations will be handled there. My past comment had to do with the technical aspects of how translations are handled in wp.org, that's why I shared the article and I mentioned that the headers were not enough.

Perhaps we can check with @iandunn if things are already ok, in order to merge the changes and finally have the translations in wp.org

Best, Juanfra.

coreymckrill commented 7 years ago

Hi @juanfra @ePascalC

@iandunn will be back online later this week. It would definitely be great to start tapping into the language packs functionality, so once he weighs in, hopefully we can get this merged and a new version submitted to the plugin repo ASAP.

juanfra commented 7 years ago

Thanks @coreymckrill!

ePascalC commented 7 years ago

Great, thanks. I'm available to help for any automated stuff that would be needed (up to my knowledge and permissions of course :-) ). Or for discussions on how to move forward. Pascal.

coreymckrill commented 7 years ago

Something funky happened when I merged this via the command line, and GitHub isn't recognizing this PR as merged. So I'm just going to close it. @juanfra your commit is in the list on the master branch, though, so you should still get the contribution credit.

juanfra commented 7 years ago

Perfect! Cheers Corey :)