laminas-i18n icon indicating copy to clipboard operation
laminas-i18n copied to clipboard

[RFC]: Deprecate & Remove Ini format translation files

Open gsteel opened this issue 1 year ago • 2 comments

RFC

Q A
Proposed Version(s) 3.0.0
BC Break? Yes

Description

laminas-config is no longer maintained but the ini file loader available here has a hard dependency on it.

I can't imagine that ini files are a popular format for translations, so I suggest deprecation in the 2.x series for removal in 3.0

This is also one of several dependencies that would prohibit upgrading to service-manager v4

gsteel avatar Jun 17 '24 22:06 gsteel

laminas-config is no longer maintained but the ini file loader available here has a hard dependency on it.

laminas-config is not needed because a simple return parse_ini_file($resource, true); is enough.

froschdesign avatar Jun 17 '24 22:06 froschdesign

laminas-config is not needed because a simple return parse_ini_file($resource, true); is enough.

Unfortunately, it's not enough - i18n expects a nested array where dot is used to delimit the next level:

[translation]
identifier1.message  = "Message 1"

parse_ini_file won't turn that into

[
  'translation' => [
    'identifier1' => [
      'message' => 'Message 1',
    ],
  ],
]

If ini format must be kept, we'll need to copy over a lump of code from the parser in laminas-config

gsteel avatar Jun 17 '24 23:06 gsteel