Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC]: Deprecate & Remove Ini format translation files #126

Open
gsteel opened this issue Jun 17, 2024 · 2 comments
Open

[RFC]: Deprecate & Remove Ini format translation files #126

gsteel opened this issue Jun 17, 2024 · 2 comments
Labels

Comments

@gsteel
Copy link
Member

gsteel commented Jun 17, 2024

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 gsteel added the RFC label Jun 17, 2024
@froschdesign
Copy link
Member

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.

@gsteel
Copy link
Member Author

gsteel commented Jun 17, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants