rolinh / dfc

Report file system space usage information with style
BSD 3-Clause "New" or "Revised" License
108 stars 9 forks source link

Bold font option added to configuration file #6

Closed MichielPater closed 8 years ago

MichielPater commented 8 years ago
rolinh commented 8 years ago

I've tested your patch. What you call "light colors" is actually simply bold font. I'd rather change the option name in this case.

MichielPater commented 8 years ago

Hi,

Yes, it is called "bold", but I was following this website, and they refer to it as light or bright colors, as it is in my case. But I wouldn't mind changing the names to "bold".

http://www.mewbies.com/how_to_customize_your_console_login_message_tutorial.htm#ccchart

I'm not sure what you mean with the is_boolean_valye() function. It is a boolean, right? Except that we use "yes" and "no" instead of "true" and "false"?

I will have a look at util.c.

MichielPater commented 8 years ago

The color names in the function colortoint() in util.c are already translated (all to English) in the .po files.

rolinh commented 8 years ago

I'm not sure what you mean with the is_boolean_valye() function. It is a boolean, right? Except that we use "yes" and "no" instead of "true" and "false"?

I mean that you would expect a function with such a name to return a boolean value but you actually use the return value directly as a value to use for "light colors".

The color names in the function colortoint() in util.c are already translated

Exactly but isn't the point of your change NOT to have to translate the color names altogether?

MichielPater commented 8 years ago

Hi Robin,

I updated according to your feedback :).

Could you send me the French translation for:

# Display bold font or extra light colors
# Note: This might work differently on some terminals
# Use either "yes" or "no"
bold_font = no

Thanks,

Michiel

rolinh commented 8 years ago

Hi @MichielPater,

I did not forget about this, I was a little busy lately.

Please, see my inline comments about your latest change.

Cheers

MichielPater commented 8 years ago

Hi,

Thanks for the review. Shall I just integrate the is_boolean_val() function directly into the code instead of using it and checking for 1 and 0? I can add a comment for the second 1 and 0 if you'd prefer. It just means bold or not bold.

Michiel

rolinh commented 8 years ago

I'd rather you #define BOLD_FONT 0 and #define REGULAR_FONT 1 or something alike. See src/extern.h. See what I mean now?

MichielPater commented 8 years ago

Definitely, sounds great! What about the "yes" and "no" checks?

rolinh commented 8 years ago

Sorry, I forgot to reply to that. Here you go:

# Afficher en gras ou couleurs claires
# Note: Cela peut ne pas fonctionner avec certains terminaux
# "yes"="oui"; "no"="non"
bold_font = no
rolinh commented 8 years ago

@MichielPater I'm thinking about something now: using this define when exporting to html or tex also makes sense.

MichielPater commented 8 years ago

I don't know TeX very well. How would I integrate that?

rolinh commented 8 years ago

For bold font in tex, one can use \textbf{...} (and <b>...<\b> for html). But well, I'm not sure how useful tex export is and if people use it. I thought about removing support for tex export at some point. JSON and XML export would be far more useful I think.

MichielPater commented 8 years ago

Honestly, for HTML, I don't think it would make too much sense to set Bold / Light color output. One could use CSS for that. And if we would add if statements for every <b></b>, it would become messy.

What do you think about the current version?

MichielPater commented 8 years ago

Tested and working.

rolinh commented 8 years ago

Thanks for your contribution!