[Owncloud] OC_L10N::tA

Georg Ehrke ownclouddev at georgswebsite.de
Mon Jul 16 15:10:34 UTC 2012


Hi all,
a long time ago the method tA was added to the class OC_L10N.
This method helps the developer to translate instantly a whole array of strings.
The problem is, that our perl script which searches for strings does not recognize the content of the array and as translatable string.
This causes bugs like this (http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-1267)
I talked a quite long time ago with Jakob about this topic and he, the developer of the perl script, had no idea how to teach xgettext to get each single string out of this array.
IMO the best solution would be to remove this method, as it brings more trouble than benefits.
I just did a grep for the tA method.
super-awesome-macbook:ownCloud georgehrke$ grep -iR '\->tA(' ./
./apps/calendar/templates/calendar.php:				var dayNames = <?php echo json_encode($l->tA(array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'))) ?>;
./apps/calendar/templates/calendar.php:				var dayNamesShort = <?php echo json_encode($l->tA(array('Sun.', 'Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.', 'Sat.'))) ?>;
./apps/calendar/templates/calendar.php:				var monthNames = <?php echo json_encode($l->tA(array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'))) ?>;
./apps/calendar/templates/calendar.php:				var monthNamesShort = <?php echo json_encode($l->tA(array('Jan.', 'Feb.', 'Mar.', 'Apr.', 'May.', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Oct.', 'Nov.', 'Dec.'))) ?>;
The tA method is only used by one file in ownCloud, so it would be easy to remove this method.

Does everybody agree to remove this method?

Cheers,
Georg Ehrke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20120716/3e33e813/attachment.html>


More information about the Owncloud mailing list