Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional German translations #102

Open
idpaterson opened this issue Jun 22, 2015 · 3 comments
Open

Additional German translations #102

idpaterson opened this issue Jun 22, 2015 · 3 comments
Assignees

Comments

@idpaterson
Copy link
Collaborator

@ckoeberle provided the following regarding the translation of a few words that were not yet translated in the German locale. Some are not direct translations, but I will try to integrate any of these that work with existing parsedatetime logic.

English German Example (english) Example (german)
from in ab two days from now in zwei Tagen ab heute
after nach the day after my birthday einen Tag nachmeinem Geburtstag
before vor one week before my birthday eine Woche vor meinem Geburtstag
prev vorher the prev day einen Tag vorher
eine Woche vorher
end of Ende des
Ende der
remind me at the end of the month
remind me at the end of the week
erinnere mich Ende des Monats
erinnere mich Ende der Woche
eod
eom
eoy
there is no corresponding german abbreviation
a
an
same as one
einem, einer
in a month
in an hour
in einem Monat
in einer Stunde

Numbers 0 to 20

Number spelled
0 null
1 eins
2 zwei
3 drei
4 vier
5 fünf
6 sechs
7 sieben
8 acht
9 neun
10 zehn
11 elf
12 zwölf
13 dreizehn
14 vierzehn
15 fünfzehn
16 sechzehn
17 siebzehn
18 achtzehn
19 neunzehn
20 zwanzig

(original discussion)

@idpaterson idpaterson self-assigned this Jun 22, 2015
@bear
Copy link
Owner

bear commented Jun 22, 2015

having more language coverage is always a huge win - thanks @idpaterson

@idpaterson
Copy link
Collaborator Author

A quick update on this: I had implemented the changes described above a few months ago but many issues arose when applying the examples as test cases (previously German tests covered only numeric datetime formats). I have not proceeded but this is still of interest to me. Will have more time available in a few months to rebase and take another stab at this provided that I can enlist the help of one of my users to design valid test cases.

@idpaterson
Copy link
Collaborator Author

This will be revisited after the test architecture is rewritten. I created very simple tests this morning to make sure that the "test all locales" logic was working and even something as simple as these "ago" phrases did not work for German:

past_integer_values:
    sourceTime: *arbitrary_date
    cases:
        - context: !pdtContext minute
          target: !timedelta
            minutes: -5
          phrases:
            - "5 minuten vorheriger"
        - context: !pdtContext hour
          target: !timedelta
            hours: -34
          phrases:
            - "34 stunden vergangener"
        - context: !pdtContext day
          target: !timedelta
            days: -2
          phrases:
            - "2 tage vergangener"

I don't know German but based on the locale config it looks like these should work. I had to use negative integers (-5 minuten, -34 stunden, -2 tage) to get the tests to pass. It will be very nice to have better test coverage for locales but looks like it might take a lot of work to get the tests to pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants