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

[ticket/11973] Remove logic from language file #1825

Merged
merged 1 commit into from Nov 3, 2013

Conversation

@nickvergessen
Copy link
Contributor

commented Oct 25, 2013

@nickvergessen

This comment has been minimized.

Copy link
Contributor Author

commented Oct 25, 2013

Ready for merge

@bantu

This comment has been minimized.

Copy link
Member

commented Oct 26, 2013

Not sure I see the benefic here. Array is certainly the better data structure.

[ticket/11973] Remove logic from tokens language array
Previously if a translator did no translate a token, it would not be
displayed. On the other hand, the translator could add additional tokens
which have no functionality.  Functionality is already hardcoded into
bbcode.php so we can that in the ACP aswell, in order to prevent namend
issues.

PHPBB3-11973
@nickvergessen

This comment has been minimized.

Copy link
Contributor Author

commented Oct 26, 2013

After a little discussion in IRC, it is the best way to just remove the logic, but keep the arrays as structure for the data.
So I rebuilt the patch.

@@ -108,11 +108,12 @@ function main($id, $mode)
'DISPLAY_ON_POSTING' => $display_on_posting)
);
foreach ($user->lang['tokens'] as $token => $token_explain)
$bbcode_tokens = array('TEXT', 'SIMPLETEXT', 'INTTEXT', 'IDENTIFIER', 'NUMBER', 'EMAIL', 'URL', 'LOCAL_URL', 'RELATIVE_URL', 'COLOR');

This comment has been minimized.

Copy link
@dhruvgoel92

dhruvgoel92 Nov 3, 2013

Contributor

Although not really important but it will be better if the order of these elements of array is same everywhere.
https://github.com/nickvergessen/phpbb/blob/6a87388e69dc1e85768bd61f146aa22a8f898130/phpBB/includes/acp/acp_bbcodes.php#L344
This is followed at other places?

This comment has been minimized.

Copy link
@nickvergessen

nickvergessen Nov 3, 2013

Author Contributor

I used the order of the language file, which is the current display order and is sorted from unlimited to very strict/specific

@dhruvgoel92 dhruvgoel92 merged commit 6a87388 into phpbb:develop Nov 3, 2013

1 check passed

default The Travis CI build passed
Details

@nickvergessen nickvergessen deleted the nickvergessen:ticket/11973 branch Apr 10, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.