phpmyadmin / phpmyadmin/motranslator

Translator exists method fails on plurals

Open
#59 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
62
Forks
25
PR merge metrics
No merged PRs in 30d

Description

so whenever an expression also has a plural form, the exists function fails. apparently it does check for the existence of the key in the cache. if I look at the cache, expressions with plural are kept like this "exampleexample+" => "translationtranslations", but even if I use this key it fails for some reason.

the problem with this is there is no way for actual error checking, other than comparing input and output, and doing that could yield a false alarm when the msgid is actually the msgstring.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing Translator::exists with an expression that has a plural form, then inspect how plural entries such as "exampleexample+" are looked up in the cache. Done means exists reliably reports whether the plural translation key exists without requiring comparison of the input and output strings.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
localization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.