Workspace numbers
- From: Thomas Thurman <tthurman gnome org>
- To: gnome-i18n gnome org
- Subject: Workspace numbers
- Date: Thu, 20 Mar 2008 12:21:21 -0400
Some background: Metacity allows you to have various numbers of
workspaces (between 1 and 36) and to give names to each of these workspaces.
If you don't give a name to a workspace, Metacity looks up
"Workspace %d"
in the translation, replaces %d with the workspace number, and uses that
instead.
However, when you go to the window menu and choose "Move to other
workspace", we need to insert underscores into the strings (to mark the
accelerators). The way we do this currently for each workspace name is
this: we check whether the workspace name matches
"Workplace %d"
from the translation, where %d can be any number (not necessarily the
number of that workspace).
If it IS, we replace it with
"Workspace %s%d"
from the translation, where %s is either an underscore (if %d is
less than ten) or the empty string (if %d is greater than ten). HOWEVER,
in the case where %d is exactly ten, we use
"Workspace 1_0"
from the translation.
If it ISN'T (this can only happen when they've renamed a workspace, and
is the most common such case) , we merely add an underscore before the
first digit, and if there are no digits, we add (_<n>) where <n> is the
index of the workspace.
Now,
a) This gives translators three strings to translate for approximately
the same function. So here's what I'd like to know from the translators:
would it be possible or desirable if we had a single string "Workspace
%d" where:
1. The %d would be replaced by index numbers to generate default
workspace names (I hope so, because this is what we do now);
2. The %d would be replaced by "_<number>" for menu options for the
first to ninth workspaces;
3. The %d would be replaced by "1_0" to generate a menu option for the
tenth workspace (i.e. the zero would be the accelerator);
4. The %d would be replaced by the plain decimal number otherwise.
b) How do languages which don't use "0" to "9" for their digits deal
with "%d" in gettext, anyway? Assuming it works properly in general, I
assume it would mean we couldn't do the third point above and everyone
would have to translate "Workspace 1_0" separately.
c) Someone has complained that it's unclear under these rules what
should happen when a workspace is called "Workspace 10 is a very nice
workspace" (see bug 453678 for details, not that they're important). I
thought I could treat this as a special case of "Workspace 10", but now
I'm thinking that's just silly and there's no way that's ever going to
be translatable in the general case.
Thomas
--
Thomas Thurman, tthurman at gnome, http://blogs.gnome.org/tthurman
You've already done enough damage!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]