some more small issues testing i18n

1 view
Skip to first unread message

Claudia Jürgen

unread,
Oct 26, 2011, 6:47:31 AM10/26/11
to bibap...@googlegroups.com
Hi all,

done some more i18n testing this morning:

1. Pluralization in en.yml
author_name_strings:
add: "[add more %{role}s]"
example: "Format: LastName, FirstName Middle (e.g., Smith,
John L.)"
remove: "[remove]"
role: "%{role}(s)"

In other languages the plural is often not formed with appending an s.
Here are some examples
Singular: Kᅵnstler
Plural: Kᅵnstler
Singular: Autor
Plural: Autoren
Singular: Beteiligter
Plural: Beteiligte

2. Import Status
de/users/1/imports
The status of the import
app/views/imports/_index_table.html.haml
%td= import.state

3. Edit Work - Type List
de/works/28/edit
Change type - List of types in English

4. Header add work
Add a work for a person - Any work
de/people/2-Jane_Doe/works/new?klass=Artwork
header - Werke fᅵr <a href="/de/people/2-Jane_Doe">Jane Doe</a> hinzufᅵgen
same in en
en/people/2-Jane_Doe/works/new?klass=Artwork
Add Works for <a href="/en/people/2-Jane_Doe">Jane Doe</a>

5. Hint for required field
de/people/2-Jane_Doe/works/new?klass=Artwork
Addition [required] for required fields

6. Just some label
de/people/2-Jane_Doe/works/new?klass=Artwork
- Notes:


Cheers

Claudia


--
Claudia Juergen
Universitaetsbibliothek Dortmund
Eldorado
0231/755-4043
https://eldorado.tu-dortmund.de/

Howard Ding

unread,
Oct 26, 2011, 11:46:29 AM10/26/11
to bibap...@googlegroups.com
On 10/26/2011 5:47 AM, Claudia J�rgen wrote:
> Hi all,
>
> done some more i18n testing this morning:
>
> 1. Pluralization in en.yml
> author_name_strings:
> add: "[add more %{role}s]"
> example: "Format: LastName, FirstName Middle (e.g., Smith,
> John L.)"
> remove: "[remove]"
> role: "%{role}(s)"
>
> In other languages the plural is often not formed with appending an s.
> Here are some examples
> Singular: K�nstler
> Plural: K�nstler

> Singular: Autor
> Plural: Autoren
> Singular: Beteiligter
> Plural: Beteiligte
>
>
Clearly - I think the intent here is to indicate in a single string that
following may be zero, one, or plural, however that is done in the
target language (which in English "Author(s)" for example does), and I
originally simply extracted it that way. The question then is if it's
possible, given just the singular in the target language, to construct a
phrase that indicates that. If so, this approach can work.

If not, there are two other possibilities. I need to look at how these
are actually used to know. They may be used in situations where we
actually know how many of the things we're talking about and hence can
find the appropriate translation. Just offhand I don't actually think
that's the case, but I'll check.

If that's not possible either it might be best just to always use the
plural of the role and live with the slight mismatch when there is only
one.

>
> 2. Import Status
> de/users/1/imports
> The status of the import
> app/views/imports/_index_table.html.haml
> %td= import.state
>
> 3. Edit Work - Type List
> de/works/28/edit
> Change type - List of types in English
>
> 4. Header add work
> Add a work for a person - Any work
> de/people/2-Jane_Doe/works/new?klass=Artwork

> header - Werke f�r <a href="/de/people/2-Jane_Doe">Jane Doe</a>
> hinzuf�gen


> same in en
> en/people/2-Jane_Doe/works/new?klass=Artwork
> Add Works for <a href="/en/people/2-Jane_Doe">Jane Doe</a>
>
> 5. Hint for required field
> de/people/2-Jane_Doe/works/new?klass=Artwork
> Addition [required] for required fields
>
> 6. Just some label
> de/people/2-Jane_Doe/works/new?klass=Artwork
> - Notes:
>
>

I think the rest of these are straightforward. I'll get to them.

Howard

Howard Ding

unread,
Oct 26, 2011, 11:55:24 AM10/26/11
to bibap...@googlegroups.com
On 10/26/2011 5:47 AM, Claudia J�rgen wrote:
> Hi all,
>
> done some more i18n testing this morning:
>
> 1. Pluralization in en.yml
> author_name_strings:
> add: "[add more %{role}s]"
> example: "Format: LastName, FirstName Middle (e.g., Smith,
> John L.)"
> remove: "[remove]"
> role: "%{role}(s)"
>
> In other languages the plural is often not formed with appending an s.
> Here are some examples
> Singular: K�nstler
> Plural: K�nstler
> Singular: Autor
> Plural: Autoren
> Singular: Beteiligter
> Plural: Beteiligte
Sorry, I didn't initially see that this was also done in the 'add'
string. That's a more obvious problem here.

Let me think about this one a little bit.

Howard

Claudia Jürgen

unread,
Oct 26, 2011, 12:02:53 PM10/26/11
to bibap...@googlegroups.com
Hi Howard,

the plural might be the best option as not only the single word like
{role}... might change but the whole phrase where it is embedded.

Composite keys with "variables" in a message catalogue are always
tricky. There is the issue of grammatical gender, too. The grammatical
gender of {role} will influence the sentece built.

Claudia

--

Howard Ding

unread,
Oct 26, 2011, 12:41:38 PM10/26/11
to bibap...@googlegroups.com
Hi,

2-6 are fixed now (not pushed to Github yet)

I think I can fix the add key (which just shows up below the list of
current creators) by making it [add another %{role}], which makes as
much sense anyway since each press is only going to add one more box. To
fix the other key, which shows up as the title/label or whatever of the
section, I need to have plurals of all the work roles available. To do
that I need to change the structure of that section of the translations
a bit and to fix up the places that are using the current structure.
I'll do that.

Howard

On 10/26/2011 5:47 AM, Claudia J�rgen wrote:

> Hi all,
>
> done some more i18n testing this morning:
>
> 1. Pluralization in en.yml
> author_name_strings:
> add: "[add more %{role}s]"
> example: "Format: LastName, FirstName Middle (e.g., Smith,
> John L.)"
> remove: "[remove]"
> role: "%{role}(s)"
>
> In other languages the plural is often not formed with appending an s.
> Here are some examples

> Singular: K�nstler
> Plural: K�nstler

> Singular: Autor
> Plural: Autoren
> Singular: Beteiligter
> Plural: Beteiligte
>
>
>
> 2. Import Status
> de/users/1/imports
> The status of the import
> app/views/imports/_index_table.html.haml
> %td= import.state
>
> 3. Edit Work - Type List
> de/works/28/edit
> Change type - List of types in English
>
> 4. Header add work
> Add a work for a person - Any work
> de/people/2-Jane_Doe/works/new?klass=Artwork

> header - Werke f�r <a href="/de/people/2-Jane_Doe">Jane Doe</a>
> hinzuf�gen

Howard Ding

unread,
Oct 26, 2011, 12:58:53 PM10/26/11
to bibap...@googlegroups.com
On 10/26/2011 5:47 AM, Claudia J�rgen wrote:
> Hi all,
>
> done some more i18n testing this morning:
>
> 1. Pluralization in en.yml
> author_name_strings:
> add: "[add more %{role}s]"
> example: "Format: LastName, FirstName Middle (e.g., Smith,
> John L.)"
> remove: "[remove]"
> role: "%{role}(s)"
>
> In other languages the plural is often not formed with appending an s.
> Here are some examples
> Singular: K�nstler
> Plural: K�nstler
> Singular: Autor
> Plural: Autoren
> Singular: Beteiligter
> Plural: Beteiligte
>
>
This is fixed now. As noted, you'll have to redo the work_roles section
of the translations using the one: and other: scheme for it to work
properly.

I've also noticed that lists tend to sort in the order of their English
labels, not the localized ones. It would be fairly easy, I think, to
ruby sort via the localized labels (the hard part here would be tracking
down where it needs to happen). However, I don't think there's any
guarantee that a Ruby string sort will produce the proper localized sort
- it may just be a generic Unicode sort or the like. I'll look into
whether there is some code available that can properly sort strings for
a given locale. But that may take a bit.

Howard

Howard Ding

unread,
Oct 26, 2011, 1:45:58 PM10/26/11
to bibap...@googlegroups.com
I fixed a couple of the sorting issues, but do let me know when you run
across others.

I'm using a fairly lightweight and simple gem (sort_alphabetical) to
help with sorting - I think it will handle Western locales fairly well,
but it might turn out that we need to do something more sophisticated at
some point. I'm content to wait until the need occurs. There really
isn't all that much out there for Ruby. There is another gem called
sort_by_alphabet that is worth consideration, but it requires a little
bit more work to use (specifying an alphabet for new locales and
probably hacking some of the internal code to actually use these when
locales are specified). It might be easier to adapt if we run into
problems, though.

Howard

Howard Ding

unread,
Oct 26, 2011, 1:47:32 PM10/26/11
to bibap...@googlegroups.com
Along the same lines - I'm not sure how well things like the A-Z
pagination lists are going to play with different alphabets (in fact, I
really expect there to be problems). Claudia - if you can let me know if
you see problems there it'd be great, and if they are there we can think
about how to handle them.

Howard

Claudia Jürgen

unread,
Oct 27, 2011, 3:27:32 AM10/27/11
to bibap...@googlegroups.com
Hello Howard,

for the time being considering Western locales will be fine I think.

Other languages will raise all kinds of other problems, writing
direction, logographic or phonetic systems ... But that's beyond the
scope of a post i18n of an existing system.

Claudia

--

Claudia Jürgen

unread,
Oct 27, 2011, 3:42:14 AM10/27/11
to bibap...@googlegroups.com
Hello all,

this is a tricky one, you would need the language as metametadata at
least for some type of metadata. Thus you can define stop words and sort
correctly.

Apart from the i18n it would be an improvement to BibApp, as it's
sorting isn't quite right at the moment.
see:
http://connections.ideals.illinois.edu/publications
(special chars at the beginning)
http://connections.ideals.illinois.edu/publications?page=T
(article at the beginning)

Or a style list:
http://connections.ideals.illinois.edu/people/288-Markus_Schulz/works?utf8=%E2%9C%93&rows=10&sort=title&order=descending&export=apa&q=*%3A*&fq%5B%5D=person_id%3A%22288%22&fq%5B%5D=status%3A3&view=all&page=1&commit=Go#works

To start thinking about metametadata in general would be great. In
DSpace we got the language as an metadata attribute. Metametadata is not
(yet) possible and this allows flat metadata schemata only and imposes
all kinds of limitations.

Cheers

Claudia

--

Reply all
Reply to author
Forward
0 new messages