Page MenuHomePhabricator

Add EDTF (PHP library) to translatewiki.net
Closed, ResolvedPublic

Description

Project information

Name: EDTF
Homepage: https://github.com/ProfessionalWiki/EDTF
Project link: https://github.com/ProfessionalWiki/EDTF
Code repository: https://github.com/ProfessionalWiki/EDTF

  • Source branch: master
  • Target branch: master

OS License: GPL-2.0-or-later
Issue Tracker: https://github.com/ProfessionalWiki/EDTF/issues
Project contact: https://github.com/JeroenDeDauw

Logo:

  • Without text: none
  • With text: none

Project description:
PHP library to parse, represent and work with the Extended Date/Time Format specification.

NOTE: Section below will be filled by twn staff

Project setup checklist

Project configuration (for translation admins)

Namespace: NS_MEDIAWIKI
Prefix:
Validators:

  • Existing ones present in mwgithub.yaml

Concerns

Event Timeline

Is there an technical documentation on how to interface with TranslateWiki? I guess there should be message files in _some_ format at _some_ location, but am unsure if there are any restrictions, preferences or best practices we should be aware off.

And is there some recommendation on what to do in PHP? Is there a standard implementation we can use? Is using something like https://packagist.org/packages/gettext/gettext recommended, or is it better if we create our own thin wrapper?

The library now has GPL license and should be ready for TranslateWiki.

https://translatewiki.net/wiki/Translating:New_project
https://translatewiki.net/wiki/Setup_of_a_new_project

I have seen those pages but was not able to find answers to my questions. Hence we just went with a simple format similar to what is used in MediaWiki and put the messages into PHP arrays for now: https://github.com/ProfessionalWiki/EDTF/blob/5d2d27a27230d651d3651dc3c56f214bf95ce772/src/EdtfFactory.php#L30-L108

Some documentation related to file formats is present here: https://www.mediawiki.org/wiki/Help:Extension:Translate/File_format_support#Supported_file_formats

It will not be possible for translatewiki to read / write messages from / to the PHP files that you've linked.

And is there some recommendation on what to do in PHP? Is there a standard implementation we can use? Is using something like https://packagist.org/packages/gettext/gettext recommended, or is it better if we create our own thin wrapper?

Gettext is supported. The banana i18n JSON (used in MediaWiki) format is also supported.

Thank you abi_! We will use the MediaWiki i18n JSON format.

We now have the messages in JSON format similar to MediaWiki: https://github.com/ProfessionalWiki/EDTF/tree/master/i18n

I think that means we are completely ready to be added to TranslateWiki now.

We now have the messages in JSON format similar to MediaWiki: https://github.com/ProfessionalWiki/EDTF/tree/master/i18n

I think that means we are completely ready to be added to TranslateWiki now.

https://translatewiki.net/wiki/Translating:Localisation_for_developers#Message_documentation

Thanks @Reedy. We now have message docs in qqq.json. Anything else that needs to happen?

abi_ triaged this task as Medium priority.
abi_ updated the task description. (Show Details)

@JeroenDeDauw We'll now start processing this request. Can you take a look at the "concerns" section?

Change 671001 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[translatewiki@master] Add support for ProfessionalWiki/EDTF

https://gerrit.wikimedia.org/r/671001

@abi_ fantastic!

I gave the TranslateWiki user write access to this repo before opening the phab ticket :)

Would it be possible to add a description string to the translation files: edtf-description?

Well yeah, but why? Is this somehow used on TranslateWiki? The linked https://github.com/ProfessionalWiki/IdGenerator is a MediaWiki extension, which uses the description on Special:Version. This request is about a PHP library, so there is no place the message would be shown.

Well yeah, but why? Is this somehow used on TranslateWiki? The linked https://github.com/ProfessionalWiki/IdGenerator is a MediaWiki extension, which uses the description on Special:Version. This request is about a PHP library, so there is no place the message would be shown.

This is shown to translators in the Translate interface.

Change 671001 merged by jenkins-bot:
[translatewiki@master] Add support for ProfessionalWiki/EDTF

https://gerrit.wikimedia.org/r/671001