E107: Why is there many missing language defines in Poll plugin?

Created on 28 May 2017  路  17Comments  路  Source: e107inc/e107

In old polls page and poll for forum etc.

Is there any particular reason for this? I think it has been like this for about 2-3 months now.

Screenshots:
image

image

bug

All 17 comments

very quick lookup : e107::includeLan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_admin.php'); ( or new style) should be added to poll_class php (please check if so) else commit by... ? (some defines used are located in admin/lan_admin.. not in poll or forum)

@tgtje Thank you for your reply so if I understand you correctly those defines are waiting to be moved to poll plugin language files, right?

Had gone through some of the discussions here about the LAN in the past and call to remove duplicated LAN defines. The best guess I could make based on this about the issue is that these missing defines were commented out in such effort? right?

'In poll plugin' was used in the sense of 'effector'... thought that was obvious.

a) no, they are not to be moved to poll.... they are in use (some at least) sidewide. The method is adding THAT line to poll class; so whenever poll class is running it 'loads' the defines from within the system languages.
b) no likely they are not commented out or deleted, but have gotten a new (more general use throughout the system) LAN. The goal is to rename LAN's that are the same use 1 (decrease lan numbers) all over, (as long as the 'meaning/words' are similar for understanding example....LAN_SAVE (meaning : Save) is pretty obvious ? so wherever in the system the WORD Save is hardcoded, you can/could (if possible) replace that by using LAN_SAVE... (it may happen that some older lan's stay intact...legacy reason when upgrading). _So i do believe that the original commit has 'missed' that piece and guessing was tested but not at forum related location It happens, we are human.._.That is all in a nutshell.
Note, _commit should be easy, but do not know if it is enough_, hencee, quick repl; i (when commiting) try to test it as much as possible).

Posted a commit ( some research showed the new LAN .. multpl. was moved to admin/lan_admin so became more general (was previous in poll/English as POLLAN_9 (poll use) and LAN_FORUM_3033 (forum use).They are commented out (old ones). _COMMIT is partial : it only addresses the poll class in forum. For the oldpoll i need more time investigating why they are NOT present at all (only hardcoded)_

Since this is a plugin, is it good ideia to have LAN's from core?
Should it use only it's own LAN's?

I've asked this same question sometime ago in gitter, and the anwser was that the plugins should rely on their own LAN's, not use another external LAN's....
And i for once agree with that, because if something changes in core, it will affect the plugin....

Only offered a working solution(forum poll, still trying to find out what happend with other> oldpoll). (forgotten, mistake ? it was found,reported and looked into)

The second i must comment is: yes it is a plugin, _but wasn't the discussion (as far is i remember) not related to 3rd party (newto add) plugin. eg. _not supplied as core__, since those are more prone to change in time? Poll is a Core present plugin, and like other Core plugins, they use system LAN's.

@rica-carv on the 3rd party plugins i fully agree they should use there own. Core based/supplied is for me something different (they normally will always be included).

@tgtje I thought that gitter "discussion" was invloving everything, from core LAN's to 3rd party plugins sharing LAN's....
Anyway, i share a different opinion from you, since core LAN's can really change overtime, so are as reliable as core plugins LAN's....

Thank you @tgtje for referencing this issue in #6

@CaMer0n could you kindly take a look and comment?

Core LANs are there there for use by the core AND by third-party plugins.
ie.

  • e107_languages/English/English.php (frontend)
  • e107_languages/English/admin/lan_admin.php (admin-area)

Terms within these files should be utilized wherever possible.

@arunshekher @tgtje please update and re-test, thank you.

The ones below the poll question in oldpolls.php are now fixed:

screen shot 2017-06-15 at 3 32 18 am


But the one in the 'All Previous Polls' listing isn't fixed:

screen shot 2017-06-15 at 3 32 47 am

@arunshekher @CaMer0n
Around line 163 (oldpolls php) LAN_TO in use (styled) , but _not_ in (any) English.php as define...also see commit https://github.com/e107inc/e107/pull/2683 .
the x and y work great .. but as described earlier the remaining LAN is also in means : to but as textual where the x/y where in timespan.

Ok to add LAN_TO ( for all common use) (meaning : to in textual sense (alike:untill) in main English php ?? for general use

@tgtje true, a quick search of the repo couldn't show me a LAN define with the preposition "to" (all lower case) for more generic use other than a "To" define in Lan file for PM plugin or something.

In this case I guess the LAN define added in commit 4fd79e4ae7e5df11c59c08c61 can be utilized. May be @CaMer0n missed the lower one. I've submitted a PR here #2689 with that one added.

Ok with me 馃憤

please reopen if pr is notmerged (for any which reason) so we can keep an eye on it.

@tgtje
Sure.

Thank you both.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MaDDoG9x9 picture MaDDoG9x9  路  4Comments

Jimmi08 picture Jimmi08  路  3Comments

Norwayman picture Norwayman  路  3Comments

Evgura picture Evgura  路  3Comments

Jimmi08 picture Jimmi08  路  5Comments