Releases: Skillshare/formatphp
Releases · Skillshare/formatphp
0.3.3
0.3.2
0.3.1
Added
- Nothing.
Changed
- Nothing.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- Fixed case where errors occurring during flattening would cause
nullto be passed to a method that does not acceptnull - Fixed case where "0" character caused a truthy check to fail, since
0 == false
0.3.0
Added
- Add Crowdin as a format for writing and reading extracted messages
- Add
pseudo-localeconsole command to allow conversion of a locale to one of the supported pseudo-locales (en-XA,en-XB,xx-AC,xx-HA, andxx-LS). - Provide
--flattenextraction option to tell the extractor to hoist selectors and flatten sentences as much as possible. For example,I have {count, plural, one{a dog} other{many dogs}}becomes{count, plural, one{I have a dog} other{I have many dogs}}. The goal is to provide as many full sentences as possible, since fragmented sentences are not translator-friendly. - Provide
--validate-messagesextraction option to print a list of validation failures and respond with a non-zero exit code on validation failures - Provide
--add-missing-idsextraction option to update source code with auto-generated identifiers - Add
Util\FormatHelperthat providesgetReader()andgetWriter()methods - Introduce
Format\Formatfinal static class for format constants - Port @formatjs/icu-messageformat-parser to FormatPHP (
FormatPHP\Icu\MessageFormat\Parser)
Changed
- The
Extractor\MessageExtractorconstructor now requiresUtil\FormatHelperas a fifth parameter - Remove
$configargument fromFormat\ReaderInterface - Remove
$localeResolvedargument fromFormat\ReaderInterface - Change type on
$optionsargument inFormat\WriterInterfacefromMessageExtractorOptionsto a dedicatedWriterOptionstype - The
MessageLoaderconstructor now accepts the following values for the$formatReaderparameter:- Fully-qualified class name for a class that implements
FormatPHP\Format\ReaderInterface - An already-instantiated instance object of
FormatPHP\Format\ReaderInterface - A callable with the shape
callable(mixed[]): FormatPHP\MessageCollection - The path to a script that returns a callable with this shape
- Fully-qualified class name for a class that implements
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- Support rich text formatting in the same manner as FormatJS. Previously, we allowed HTML tags with attributes, etc., but this limits our ability to provide pseudo-locales and validation.
0.2.2
0.2.1
0.2.0
Added
- Use a ParserErrorCollection instead of array to pass errors through to the parsers for appending errors
- Provide
--parseroption to the extract command to allow custom parsers, in addition to the defaultphpparser
Changed
- Remove
DescriptorParserInterface::parse() - Add
DescriptorParserInterface::__invoke()
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- Nothing.
0.1.0
Added
- Initial release of base functionality:
FormatPHP\FormatPHP::formatMessage()to format messages- Message extraction from application source code through
formatphp extractconsole command - Message loading of locale messages in 3 formats: FormatPHP, Simple, and Smartling
FormatPHP\Intl\LocaleandFormatPHP\Intl\MessageFormatfor basic conformance with ECMA-402 and FormatJS
Changed
- Nothing.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- Nothing.