asikart / remoteimage

Asikart RemoteImage helps you manage Joomla CMS image and media files on local and remote FTP host.
http://ext.asikart.com/extensions/asikart-remoteimage.html
10 stars 11 forks source link

New language #16

Closed olive31 closed 9 years ago

olive31 commented 9 years ago

Hi, I have added a new language to remoteimage (French) by simply adding the fr-FR folder and translating the files copied from the en-GB folder.

Unfortunately, this does not work for the user interface (only the config editor is OK) that remains blank.

Any suggestion would be appreciated (as you can see I am a total newbie with Joomla)

Best

asika32764 commented 9 years ago

Hi,

Actually, elFinder has FR language, it not in Joomla language system.

See: https://github.com/asikart/remoteimage/tree/staging/admin/asset/js/elfinder/js/i18n

But there is a little bug I found that Joomla use fr-FR but elFinder only use fr, so my ARI can not auto detect language name.

I will think how to fix this bug later.

olive31 commented 9 years ago

OK, thanks. I could fix the bug I guess but I have strictly no idea what the ARI is and where to look for and even the best tools to debug Joomla components that use JSON (how to print an dump or a error message for instance would help as I am currently writing to stdout and get the print in the JSON answer ... yes that's prehistorical I suppose)

asika32764 commented 9 years ago

Try Post Man. It's a good tool to help us prettify JSON output.

Open Joomla debug mode and change Error Reporting to development (these two config in global configuration), Joomla will output some system message at bottom of page.

In ARI component, use show($data1, $data2, ...); dump data, it will help you check array or object in a formatted text.

Then I have to say elFinder is not so easy to debug, so maybe you have to try many times in a little bug.

Best'

PS: ARI is abbreviation of Asikart RemoteImage

asika32764 commented 9 years ago

The language including code right here: https://github.com/asikart/remoteimage/blob/staging/admin/src/Remoteimage/View/ManagerView.php#L149

olive31 commented 9 years ago

Thnx, I corrected the bug... the correct language js file is now embedded, I fixed also the fact that french ' in your translation file can generate a bug when used in JS...

I just need to find out now how to tell elfidner to switch to french. I think that this is an option in the javascript initialisation of the client ...

olive31 commented 9 years ago

OK, all is working now. I update my branch

asika32764 commented 9 years ago

Merged, thank you.

Reference to #17