Le-Bit / vim-epitech

Syntastic epitech style guide
16 stars 4 forks source link

Epitech header's dates are dependent on locale #8

Open juliencampion opened 9 years ago

juliencampion commented 9 years ago

Here's how my Epitech header (created with vim-epitech) looks:

/*
** exec_type.c for 42sh in /home/julien/projets/epitech/B2/42sh/rendu/src/pline
**
** Made by Julien Campion
** Login   <campio_j@epitech.eu>
**
** Started on  mar. mai 12 10:56:39 2015 Julien Campion
** Last update dim. mai 24 13:33:36 2015 Julien Campion
*/

Notice how the creation and modification dates on my header are in French, because my system locale is in French. Or, as I understand it Epitech's C header should look exactly like the Emacs one, where the dates are in English. Is there any way for me to output the date in the correct format without having to change my system locale to do so?

casimir commented 9 years ago

You can change your editor's locale, language time en_US.utf-8 should do the trick.

juliencampion commented 9 years ago

Sorry for the long delay to answer.

Yes it worked perfectly. But I'm also thinking of other people who would like to keep their language settings set to default and output english date text only for the Epitech header. Isn't there a way to only output the time in English in the plugin files and to be able to keep one's current locale outside the plugin?

casimir commented 9 years ago

Should be fixed with dc09994d7249a122c13c34a6f186966c1fe384d6. If no en_US locale is present on the system it should fallback to C.

@juliencampion does it fix it?

juliencampion commented 9 years ago

It worked only when I replaced 'en_US' in header.vim with 'en_US.utf-8'.

I removed the en_US locale and tried again but the script told me 'Could not choose language: en_US.utf-8'.

casimir commented 9 years ago

What do you get with language time afterwards?

juliencampion commented 9 years ago

"fr_FR.UTF-8"

juliencampion commented 9 years ago

Oh by the way 'en_US' is still not replaced with 'en_US.utf-8' in header.vim.