Bug 5957 - addThis code contains hard coded strings (not translated) and element styles.
addThis code contains hard coded strings (not translated) and element styles.
Status: NEW
Product: OJS
Classification: Unclassified
Component: Reading Tools
2.4.x
PC Windows 7
: P3 normal
Assigned To: PKP Support
Depends on: 5983
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-25 10:59 PDT by jerico
Modified: 2012-09-21 13:13 PDT (History)
1 user (show)

See Also:
Version Reported In:
Also Affects:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jerico 2010-09-25 10:59:04 PDT
see article/footer.tpl:

examples:
alt="Bookmark and Share"
style="border:0;padding:0"
title="Bookmark using any bookmark manager!"

strings should be translated and styles should be managed via CSS only
Comment 1 jerico 2010-09-25 11:15:09 PDT
Some other less than optimal implementation issues IMO:
- SharingRT::getLanguages() contains a hard coded language list. This should probably go to Locale or some other library class unless this list is somehow restricted by "share-this".
- SharingRT::getBtnStyles() contains information that belongs into the view and should be held somewhere there (image names, image pixel width and height).
- both methods are not properly documented.
- If we had a CSS-styled button with a background image then we probably wouldn't need translated images at all which would make maintenance of this RT much easier.
Comment 2 jerico 2010-09-25 11:18:46 PDT
border, height and width should also be set via CSS and not via html
Comment 3 jerico 2010-09-27 20:14:22 PDT
(In reply to comment #1)
> - SharingRT::getLanguages() contains a hard coded language list. This should
> probably go to Locale or some other library class unless this list is somehow
> restricted by "share-this".

PKPLocale now contains conversion methods (see #5983) that take a locale to an iso 3-letter code (and vice-versa) and that convert between iso 2- and 3-letter codes for languages. Use these methods rather than SharingRT::getLanguages().