Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multilanguage Support via gettext #509

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open

Multilanguage Support via gettext #509

wants to merge 9 commits into from

Conversation

belzael
Copy link

@belzael belzael commented Mar 18, 2013

  • added gettext encapsulations to all texts i thought necessary
  • added fallback function for the case that the gettext extension isn't loaded
  • added browser language detection
  • added gettext to the list of optional extensions in setup
  • rewritten some of the texts to use sprintf instead of appending strings
  • added german translation file
  • removed mark_overdue-confirm from cannedresponses.inc.php

- added gettext encapsulations to all texts i thought necessary
- added fallback function for the case that the gettext extension isn't loaded
- added browser language detection
- added gettext to the list of optional extensions in setup
- rewritten some of the texts to use sprintf instead of appending strings
- added german translation file
- removed mark_overdue-confirm from cannedresponses.inc.php
- Better detection of translation files
- Added functionality to redirect language codes (see redirecting
language codes)
- Ticket Status can be translated
- The Datepicker can be translated
- Extended functionality of 'testlang.php' to show what language code is
used to translate
- Forgotten to change $var to $vars in line 380 of class.mailfetch.php
- Removed unneeded comment
- Added php_gettext support (thanks to Danilo Segan and Steven
Armstrong)
- php_gettext is now the primary translation engine
- Extended language detection functionality
@ntozier
Copy link

ntozier commented Mar 28, 2013

Hey Thane, Thanks for posting this here. :)

- readd multi language changes to ajax.tickets.php, that i removed for
upstream merging
@belzael
Copy link
Author

belzael commented Mar 29, 2013

I'm happy as long as it's useful

removed some changes in
- include/class.api.php
- include/class.mailfetch.php
- include/staff/filter.inc.php
@tomashastings
Copy link
Contributor

Thanks for this! Translating to dutch now! 👍

@tomashastings
Copy link
Contributor

@thane-de-loth when translating to Dutch I found a lot of inconsistencies in the English language file e.g. 'Knowledge base' vs. 'Knowledgebase' (with and without space).

I would like to fix the inconsistencies in the English version as well, but that would break your language support, what's the best way to go about this?

@belzael
Copy link
Author

belzael commented Apr 9, 2013

I saw them too when i translated to german. I've just translated both the same way, since i wanted to change as little as possible. You can change the text and as long as you leave the __() around it nothing should break.

You could fork osticket youself and make a pull request of your changes. I'll adjust my mod to any changes made. Or you could submit a pull request to my fork, i'll then add your changes to the next mod update.

Also i saw that some other people translate to dutch in the forum. Maybe working together will speed up your translation.

@tomashastings
Copy link
Contributor

I saw people were working on Dutch too, I asked them how far they were. I'm at 54% now and keep running into double strings with only double spacing as difference, or double strings with one capital different, and strange things like canned responses being called premade responses sometimes and canned other times.

A /lot/ of cleaning needs to be done, but for now I will be able to use a Dutch version, so I guess it's worth it

@tomashastings
Copy link
Contributor

I have completed the Dutch translation @thane-de-loth , I tried to commit them to you but that doesn't seem to work using the Mac Github application.

@belzael
Copy link
Author

belzael commented Apr 10, 2013

login to the website view of your fork in github and you should see a 'pull request' button above the filestructure. click on it and change base repo to thane-de-loth/osTicket-1.7. then set up your pull request.
more information here:
https://help.github.com/articles/using-pull-requests

@belzael
Copy link
Author

belzael commented Apr 10, 2013

also, thanks for your contribution

@tomashastings
Copy link
Contributor

I'm having trouble creating a pull request for just the Dutch language file. It wants to include all of your files in the request, that doesn't seem ideal.

@drewx0r
Copy link

drewx0r commented Apr 11, 2013

I was just going to ask about doing something like this. I've been going through tweaking spelling and readability in English. Really nitpicky stuff, but I'm OCD about language, so I did it anyway. Hopefully my pull request and your pull request get along.

@belzael
Copy link
Author

belzael commented Apr 11, 2013

@tomashastings
Did you fork my repository or osticket? The only way i can think of to resolve that issue is making a secondary fork of my repository (see http://blog.adrianshort.co.uk/2011/11/08/create-multiple-forks-of-a-github-repo/) and add your changes via browser (to avoid mac client issues). Then do a pull request. Sadly I'm a github novice so i can't help you out that much.

@drewx0r
I don't think your changes are an issue. They should make translations easier. I'll simply adjust my mod to your changes, when they're pulled to master. Since osticket is evolving I'll have to adjust anyway.

@tomashastings
Copy link
Contributor

@thane-de-loth I cloned your repo with the Mac app, I think that messed everything up. It looks like I'll have to use the command line tools to do it properly.

@durasj
Copy link

durasj commented Jul 18, 2013

Any updates on this?

@gautiermichelin
Copy link

Hi Thane and others.

Is this pull request still alive ?

I'm ok to help to speed up integration of i18n to osticket.

To protich and greezybacon : if I help by separating i18n only (no language, no customization, only gettext i18n support) in a single pullrequest, would this fasten your process ?
If not, is there something else I could to do to help either Thane, either the admin to add i18n to osticket ?

Bye,

Gautier

@greezybacon
Copy link
Contributor

@gautiermichelin, @thane-de-loth, @tomashastings, others, seriously, thank you so much for helping us on this. We're gearing up to take multilingual osTicket seriously. For me, the first mile before we can get it off the ground is to pull everything out of the install SQL script that should be translated. osTicket 1.7.0 now prohibits modifications to the SQL file while maintaining compatibility with upstream osTicket. Furthermore, it forces every osTicket install to have the exact same database state (signature) in order to provide database migration support. Therefore, it cannot be translated.

For this reason, I have proposed a rather large request, #654, which makes this possible. When we get this merged, then all the data that ships with the system will be translatable. Then, we can work on making the interface content translatable as well.

I'm also proposing that we merge these changes into osTicket 1.8.0 instead of 1.7 since the changes to the codebase will be so dramatic. I'll be creating the osTicket-1.8 repo this week hopefully and will merge #564. Thereafter, we would like to change to a templating system based on H20. Once we get there, I think we will be fully ready to get going on translations.

I agree with @tomashastings, one of the major focuses before translation should be language content cleanup.

I'd like to get a forum thread and a mailing list together in hopes of getting the translator community together on this effort. Any help you could provide there would be awesome.

@gautiermichelin
Copy link

Hy Jared,

what we've here is quite next both to a forum thread and a mailing list : I can reply by email & all my comments are published under #509

But if you want something more, that's what comes to me first :

  • Mailing list : If you want something more reactive, you can opt in for a new Google Group. Even github has one, so it seems it's a missing feature even for people on (github) board...
    https://groups.google.com/forum/#!forum/github
  • Forum : http://osticket.com/forums/ Is there an option on the forums to receive each new post to a thread by email ? As I am active in opensource projects for museum (collection management with CollectiveAccess, mobile tours with TourML...), it would be hard for me to regularly check if something new is up :-(

For me, don't duplicate the effort with both a forum thread and a mailing list... and this last option is my favorite ;-)

Do you need to moderate subscriptions to this forum/mailing list ? (eg focus on developers and/or translators)

@gautiermichelin
Copy link

Cloning and going to the @greezybacon new repo https://github.com/osTicket/osTicket-1.8...

I've added an issue to this new repo to make the link with this pull request : osTicket/osTicket#1

To everyone : if you want to receive notification for all comments under this new issue, go the page osTicket/osTicket#1 & just click the Watch button, bottom of the screen :

capture decran 2013-08-12 a 22 03 44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants