-
Deprecate
ProviderFactoryTestCase
, extendAbstractProviderFactoryTestCase
insteadThe
testIncompleteDsnException()
test is no longer provided by default. If you make use of it by implementing theincompleteDsnProvider()
data providers, you now need to use theIncompleteDsnTestTrait
. -
Make
ProviderFactoryTestCase
andProviderTestCase
compatible with PHPUnit 10+ -
Add
lint:translations
command -
Deprecate passing an escape character to
CsvFileLoader::setCsvControl()
-
Make Xliff 2.0 attributes in segment element available as
segment-attributes
metadata returned byXliffFileLoader
and makeXliffFileDumper
write them to the file
- Mark class
DataCollectorTranslator
asfinal
- Remove
PhpStringTokenParser
- Remove
PhpExtractor
in favor ofPhpAstExtractor
- Give current locale to
LocaleSwitcher::runWithLocale()
's callback - Add
--as-tree
option totranslation:pull
command to write YAML messages as a tree-like structure - [BC BREAK] Add argument
$buildDir
toDataCollectorTranslator::warmUp()
- Add
DataCollectorTranslatorPass
andLoggingTranslatorPass
(moved fromFrameworkBundle
) - Add
PhraseTranslationProvider
- [BC BREAK] The following data providers for
ProviderFactoryTestCase
are now static:supportsProvider()
,createProvider()
,unsupportedSchemeProvider()
andincompleteDsnProvider()
- [BC BREAK]
ProviderTestCase::toStringProvider()
is now static
- Deprecate
PhpStringTokenParser
- Deprecate
PhpExtractor
in favor ofPhpAstExtractor
- Add
PhpAstExtractor
(requires nikic/php-parser to be installed)
- Parameters implementing
TranslatableInterface
are processed - Add the file extension to the
XliffFileDumper
constructor
- Add
github
format & autodetection to render errors as annotations when running the XLIFF linter command in a Github Actions environment. - Translation providers are not experimental anymore
- Add
translation:pull
andtranslation:push
commands to manage translations with third-party providers - Add
TranslatorBagInterface::getCatalogues
method - Add support to load XLIFF string in
XliffFileLoader
- added support for calling
trans
with ICU formatted messages - added
PseudoLocalizationTranslator
- added
TranslatableMessage
objects that represent a message that can be translated - added the
t()
function to easily createTranslatableMessage
objects - Added support for extracting messages from
TranslatableMessage
objects
- added support for
name
attribute onunit
element from xliff2 to be used as a translation key instead of always thesource
element
- removed support for using
null
as the locale inTranslator
- removed
TranslatorInterface
- removed
MessageSelector
- removed
ChoiceMessageFormatterInterface
- removed
PluralizationRule
- removed
Interval
- removed
transChoice()
methods, use the trans() method instead with a %count% parameter - removed
FileDumper::setBackup()
andTranslationWriter::disableBackup()
- removed
MessageFormatter::choiceFormat()
- added argument
$filename
toPhpExtractor::parseTokens()
- removed support for implicit STDIN usage in the
lint:xliff
command, uselint:xliff -
(append a dash) instead to make it explicit.
- deprecated support for using
null
as the locale inTranslator
- deprecated accepting STDIN implicitly when using the
lint:xliff
command, uselint:xliff -
(append a dash) instead to make it explicit. - Marked the
TranslationDataCollector
class as@final
.
- Improved Xliff 1.2 loader to load the original file's metadata
- Added
TranslatorPathsPass
- Started using ICU parent locales as fallback locales.
- allow using the ICU message format using domains with the "+intl-icu" suffix
- deprecated
Translator::transChoice()
in favor of usingTranslator::trans()
with a%count%
parameter - deprecated
TranslatorInterface
in favor ofSymfony\Contracts\Translation\TranslatorInterface
- deprecated
MessageSelector
,Interval
andPluralizationRules
; useIdentityTranslator
instead - Added
IntlFormatter
andIntlFormatterInterface
- added support for multiple files and directories in
XliffLintCommand
- Marked
Translator::getFallbackLocales()
andTranslationDataCollector::getFallbackLocales()
as internal
- The
FileDumper::setBackup()
method is deprecated. - The
TranslationWriter::disableBackup()
method is deprecated. - The
XliffFileDumper
will write "name" on the "unit" node when dumping XLIFF 2.0.
- removed the backup feature of the
FileDumper
class - removed
TranslationWriter::writeTranslations()
method - removed support for passing
MessageSelector
instances to the constructor of theTranslator
class
- Added
TranslationDumperPass
- Added
TranslationExtractorPass
- Added
TranslatorPass
- Added
TranslationReader
andTranslationReaderInterface
- Added
<notes>
section to the Xliff 2.0 dumper. - Improved Xliff 2.0 loader to load
<notes>
section. - Added
TranslationWriterInterface
- Deprecated
TranslationWriter::writeTranslations
in favor ofTranslationWriter::write
- added support for adding custom message formatter and decoupling the default one.
- Added
PhpExtractor
- Added
PhpStringTokenParser
- Added support for escaping
|
in plural translations with double pipe.
- Deprecated the backup feature of the file dumper classes.
- removed
FileDumper::format()
method. - Changed the visibility of the locale property in
Translator
from protected to private.
- deprecated FileDumper::format(), overwrite FileDumper::formatCatalogue() instead.
- deprecated Translator::getMessages(), rely on TranslatorBagInterface::getCatalogue() instead.
- added
FileDumper::formatCatalogue
which allows format the catalogue without dumping it into file. - added option
json_encoding
to JsonFileDumper - added options
as_tree
,inline
to YamlFileDumper - added support for XLIFF 2.0.
- added support for XLIFF target and tool attributes.
- added message parameters to DataCollectorTranslator.
- [DEPRECATION] The
DiffOperation
class has been deprecated and will be removed in Symfony 3.0, since its operation has nothing to do with 'diff', so the class name is misleading. TheTargetOperation
class should be used for this use-case instead.
- added DataCollectorTranslator for collecting the translated messages.
- added possibility to cache catalogues
- added TranslatorBagInterface
- added LoggingTranslator
- added Translator::getMessages() for retrieving the message catalogue as an array
- added relative file path template to the file dumpers
- added optional backup to the file dumpers
- changed IcuResFileDumper to extend FileDumper
- added classes to make operations on catalogues (like making a diff or a merge on 2 catalogues)
- added Translator::getFallbackLocales()
- deprecated Translator::setFallbackLocale() in favor of the new Translator::setFallbackLocales() method
- QtTranslationsLoader class renamed to QtFileLoader. QtTranslationsLoader is deprecated and will be removed in 2.3.
- [BC BREAK] uniformized the exception thrown by the load() method when an error occurs. The load() method now throws Symfony\Component\Translation\Exception\NotFoundResourceException when a resource cannot be found and Symfony\Component\Translation\Exception\InvalidResourceException when a resource is invalid.
- changed the exception class thrown by some load() methods from \RuntimeException to \InvalidArgumentException (IcuDatFileLoader, IcuResFileLoader and QtFileLoader)
- added support for more than one fallback locale
- added support for extracting translation messages from templates (Twig and PHP)
- added dumpers for translation catalogs
- added support for QT, gettext, and ResourceBundles