shnupta / bric

bric is a text editor based on kilo.
GNU General Public License v3.0
37 stars 34 forks source link

lines modified should be modified to support extra plural forms #124

Closed andy5995 closed 6 years ago

andy5995 commented 6 years ago

https://github.com/shnupta/bric/blob/8f79d01e2f8a6dd9915b409d3b7dd4bb808bd976/src/bric.c#L1006

I suggest 2 things happen to this string.

  1. Use ngettext() to support plural forms
  2. combine the string (so "lines" and "modified" will be on a single line in a po file)

Right now, essentially the string is "combined", but for it to appear as a single translatable line in a po file, in the source code, the string must not be broken apart.

It will require adding a few extra lines of code, but it's really the preferred method.

For more info, see https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html#Plural-forms

shnupta commented 6 years ago

Looks like a much better way, especially if we are going to have many translations in the future. Are you going to make this change?

andy5995 commented 6 years ago

combine the string (so "lines" and "modified" will be on a single line in a po file)

I realize this actually isn't too relevant in this case. "modified" refers to the file, not the lines.

andy5995 commented 6 years ago

Completed in https://github.com/shnupta/bric/commit/0ca39e2259d5bc52fe56a0e92d89ab8eba05b549#diff-8dc60bf261283d11faa08951523239d7