UMB-CS-682-Team-03 / tracker

0 stars 0 forks source link

Does _generic.translation still need hardcoded "Apply", "Cancel" ... responses? #86

Open rouilj opened 5 months ago

rouilj commented 5 months ago

The current (_generic.translation)[https://github.com/UMB-CS-682-Team-03/tracker/blob/3c827ab4e9309c0e2582abd5c48c6a03fcad8524/html/_generic.translation#L5-L10] includes hard coded endpoints for "Apply", "Cancel" ...

However I think these lines:

https://github.com/UMB-CS-682-Team-03/tracker/blob/3c827ab4e9309c0e2582abd5c48c6a03fcad8524/html/classhelper.js#L310-L320

add the:

const CLASSHELPER_TRANSLATION_KEYWORDS = ["apply", "cancel", "next", "prev", "search", "reset", CLASSHELPER_READONLY_POPUP_TITLE ];

apply, cancel and other terms hardcoded in _generic.translation to the properties list to be translated.

@patel-malav am I correct the hard coded translations:

      "Apply": "<tal:x tal:replace="python:i18n.gettext('Apply')" />",
      "Cancel": "<tal:x tal:replace="python:i18n.gettext('Cancel')" />",
      "Next": "<tal:x tal:replace="python:i18n.gettext('Next')" />",
      "Prev": "<tal:x tal:replace="python:i18n.gettext('Prev')" />",
      "Search": "<tal:x tal:replace="python:i18n.gettext('Search')" />",
      "Reset": "<tal:x tal:replace="python:i18n.gettext('Reset')" />"

can be removed since the terms are now included in the properties query parameter?

patel-malav commented 5 months ago

Yes they can be removed.

Need to update the generic.translations tal

rouilj commented 5 months ago

Thanks for the confirmation Malav.

I'll have to play with it a bit.

Removing the hard coded values means I have to change the insertion of ,'s before the items in the properties list are output. The first item shouldn't get a , since there is no item in the json output before it. I'll have to figure out how to do that.

I could hack it by putting in a single dummy first item but....