Re: Style of Comment[xx]=blah blah blah.<- the dot



On Sat, 2 Sep 2000, Gediminas Paulauskas wrote:

> > 
> > Dear all,
> >       I have noticed that there is no consistent style for the
> > translations in the .desktop/.directory/etc files with respect with the
> > Comment lines.
> > 
> > For example,
> > 
> > Comment[xx]=This is a test
> > Comment[xx]=This is a test.
> > 
> > Should the full stop be put at the end of the line or not?
> > 
> > My opinion is that it should not.
> 
> You are right.
> 
> from gnome-libs/devel-docs/suggestions.txt:
> 
>  - Your menu hints should not have a trailing period.  They should be
>    phrased like commands, e.g. "Open a new file".  Do NOT phrase them
>    like a description, e.g. "Opens a new file".
> 
> I think the same rule applies to Comment[xx], because these all basically
> are tooltips.

In this case, there should a cleanup. The most affected area is
"control-center". Programmatically, it could be done easily with 

a. find . -name "*.desktop" -exec cat "{}" \; 

This finds the .desktop. Save with .directory. .soundlist look clean.
Then pipe to:

b.  perl -n -e 'if
(/^Name|^Comment|^Label|^ExtendedLabel|^LeftLabel|^RightLabel/) 
{
  s/\.\s$//o; print $_;
}'

For the affected strings, it removes, starting from the end of line, all
whitespace up and including the dot.
As it is above, it just prints the corrected strings.

Once the script is ok, then you can use "perl -pi ..." (in place
substitution) to have the changes done automatically.

simos





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]