Unused Lang keys

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.2.x. If you need support for phpBB 3.2.x please visit the 3.2.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Post Reply
skouat
Registered User
Posts: 13
Joined: Tue Mar 01, 2011 11:19 pm

Unused Lang keys

Post by skouat »

Hi guys!

How to ensure that a specific lang key is not yet used?
How to report a language key that doesn't seem to be used?

eg:
en/acp/users.php
  • USER_GROUP_ADD
    USER_GROUP_NORMAL
    USER_GROUP_PENDING
    USER_GROUP_SPECIAL
en/mcp.php
  • LOGS_CURRENT_TOPIC
en/groups.php
  • FORUM_UNDISCLOSED
en/common.php
  • LOG_WARNING_DELETED
I tried to look in the code of phpBB, but none of these seem to be used.

Best regards,
Skouat.

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: Unused Lang keys

Post by nickvergessen »

The problem is we sometimes build strings on the run time: topic/post + action: TOPIC_DELETE etc.
Therefor, it's almost impossible to be sure a string is not used.
LOG_ strings should be kept as long as possible, so the still display correctly.
Member of the Development-TeamNo Support via PM

skouat
Registered User
Posts: 13
Joined: Tue Mar 01, 2011 11:19 pm

Re: Unused Lang keys

Post by skouat »

I agree with the fact that it is difficult to know if a key is used or not. But it's not impossible.
For us translators, it is difficult to translate without knowing the context of the use of language keys. That's why I open this topic.
If some lang keys are not used, it would be better to remove or tag them.

For "LOG_" language keys, yes it's difficult. But for the others? is it difficult too?

Maybe, we can tag the suspected lang keys as you did in the en/acp/common.php.
Not with the tag "deprecated", but with another such as "suspected unused".
And, if after many checks it appears that the lang key is not used, we remove it in the next release.

Skouat.

Post Reply