GothenburgBitFactory / timewarrior

Timewarrior - Commandline Time Tracking and Reporting
https://timewarrior.net
MIT License
1.25k stars 94 forks source link

Add internationalization to TimeWarrior #215

Open psychoslave opened 5 years ago

psychoslave commented 5 years ago

So timewarrior is great, but it would be even more awesome with a internationalization support, wouldn't it?

Would any action toward this be welcome, or is it not desired?

Cheers

lauft commented 5 years ago

There are no plans for internationalization for the next releases/the near future.

Internationalization may be great, but it is rather an icing on a cake than the dough. So it is not on the top 3 of my what-enhancement-to-add-next-list. Also I am planning some major internal refactoring with TimeWarrior 2.0.0 which will most likely conflict with any adaptation required to use an internationalization library like gettext. So am am scheduling this for post-2.0.0. So I am keeping this issue as a reminder for that ;)

Help with internationalization is always welcome, but definitely requires dedication to that task

psychoslave commented 5 years ago

Well, how important is a feature depends in part to your target audience. If TimeWarrior aim at staying accessible only to those who can speak English that's a matter of choice.

I would be happy to help with this topic, but I have no energy to go against the main stream of community mindset. Especially, what I had in mind is that the tool should not simply support localized output, but also take into account localization environment variable for input. So if say LANG=eo, then :morgaŭ should work as :tomorrow and when LANG=fr then :hier should woks like :yesterday.

One could even go as far saying that with LANG=C :1 would be equivalent to :today, provided that that this would be the corresponding value in an enum of hints. Thus said, after a quick look at the code, I see that the implementation use strings like "today" rather than an enum for this (but possibly I'm wrong here, I just quickly looked with a ack).

So once again, I would be happy to help with this topic, but my prior question was due to my view that it should requires a deep integration in the design of the software, that is exactly the opposite of the "icing on a cake". To my mind, good internationalization, like accessibility, is not something you can put on top of the finished product, which is a receipt for partial superficial support that brings only more difficulties in the use of the tool, at which no support at all is a more honest solution.

Please let me know how you feel about it, and have a nice week.

psychoslave commented 5 years ago

Hi @lauft, could you give me some feedback on these points? Cheers

lauft commented 5 years ago

As you correctly stated, good internationalization requires a deep integration into the design of the software. Currently I see Timewarrior not near this point where it can support this. You already noticed the use of strings for datetimes like "today", "yesterday", etc.

When I called internationalization the "icing on the cake" I meant that (despite the required design goes deep) its effect is rather superficial - in the sense that it concerns (mostly) the UI. In contrast to e.g. a GUI application a command line tool's output/input is rather minimal. And most of Timewarriors in-/output are datetimes which are (mostly) international. That's why it is "not among the top 3 of my what-enhancement-to-add-next-list".

My plan is not to rush this but to take one step at a time. Most of the adaptations required for other enhancements may lead into the right direction to make internationalization possible, but I agree with your point that also "no support at all is a more honest solution".

It's a long way, but each journey of a thousand miles begins with a single step...