satrun77 / tinyissue

Simple Issue Tracking for Teams
MIT License
48 stars 6 forks source link

Translations #17

Closed nickbe closed 8 years ago

nickbe commented 8 years ago

Also something I could help right away. I suppose there are language files somewhere. I'd like to contribute a german translation. (And now that I come to think of it. I also offer to provide a german project website)

nickbe commented 8 years ago

I tried to create a new set of language files in resources/lang/de and I can select the new language for the current user. But the translation does not seem to be loaded.

Can you check why translations are not being displayed?

satrun77 commented 8 years ago

The localization is oversighted! Now it should work fine in develop branch. Thanks for reporting this issue

nickbe commented 8 years ago

Great. I think the standard laravel language folders are missing here. If you just add them together with the additional tinyissue.php file (always in english), I see to it that some of them are being translated right away.

I'll do the proper german translation myself and I have some others who will help. I have someone for the russian version and also for the french version. Probably also spanish

satrun77 commented 8 years ago

Language files are in ./resources/lang/

Copy the folder ./resources/lang/en to ./resources/lang/de, and then modify the files in de folder.

nickbe commented 8 years ago

Seems like someone did the basic stuff already. You think we could use them: https://github.com/caouecs/Laravel-lang ?

satrun77 commented 8 years ago

Nice package.

They cover the basic text only. We do need to translate text specific to this project too. I will look into this package tonight

nickbe commented 8 years ago

If you include the basic packages then we can go from there...

nickbe commented 8 years ago

Also tested. Works fine now. I wait until you've added the default lang folders in the next release and try to cover as many translations as I can then.

satrun77 commented 8 years ago

What you do you mean by adding default lang folders?

nickbe commented 8 years ago

I thought you wanted to simply add all the default folders from https://github.com/caouecs/Laravel-lang

I can then add the tinyissue.php in all the folders.

satrun77 commented 8 years ago

Ah ok. The cool thing about the module is you don't have too. The package 'overtrue/laravel-lang' is a layer over the package 'caouecs/Laravel-lang' that loads all language files.

If you want to override text or add new ones you can add them to ./resources/lang/[language name].

The dropdown box in Tinyissue, displays languages only from the directory ./resources/lang/. The question would be, should we support all languages in caouecs/Laravel-lang? or start small by adding ones that we have translation for? (ie. first add German, then french, and so on).

I prefer to start small, so its not a big change all in one hit. What you think?

nickbe commented 8 years ago

I definetly agree. Let's start small.

Do we need to put all 4 or 5 files for one language into the referring lang folder or just the tinyissue.php?

satrun77 commented 8 years ago

You don't need all files.

The package first loads all files from the package 'caouecs/Laravel-lang' then merge any changes from ./resources/lang/[language name] For example, if you want to change the validation message for email, then add the file validation.php

<?php 

return [
        'email'                => 'This message will be used instead of the original one from caouecs/Laravel-lang.',
        'New validation' => 'You can add new messages here too',
];

The tinyissue.php will be needed for all of the support langs

nickbe commented 8 years ago

Great. I'll dig into this in the next days. It's almost 3 in the morning here. So I'll call it a night.

Thanks for everything so far. I promise I'll try to help as best as I can. Cheers

nickbe commented 8 years ago

Did you find time to investigate the language problem? Any clue why tinyissue tends to fall back to english?

satrun77 commented 8 years ago

Yes. This is related to the route configuration when public project is enabled.

nickbe commented 8 years ago

Easy fix? Or should I just disable public projects for now?

satrun77 commented 8 years ago

I want to re-code the route configuration to avoid this issue and other ones you have reported.

It is easy to fix. I'm very busy these days!

nickbe commented 8 years ago

Ok. I disable public projects for now. I want to get some translations going in the next days.

satrun77 commented 8 years ago

Fix in develop branch

nickbe commented 8 years ago

Hey :) I created a tinyissue channel on gitter and sent you an invite :)

nickbe commented 8 years ago

Did you already check my pull request?

nickbe commented 8 years ago

Confirmed. Works as expected now. Closed