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

Some german texts are left in the output #215

Open
jkrinke opened this issue Jan 11, 2015 · 1 comment
Open

Some german texts are left in the output #215

jkrinke opened this issue Jan 11, 2015 · 1 comment

Comments

@jkrinke
Copy link
Contributor

jkrinke commented Jan 11, 2015

There are some german texts in left in the output from Praktomat. As discussed last year, there is no proper internationalisation in Praktomat although some of the texts are already using some internationalisation functions.

As my students don't speak german, I am happy to change the german texts to english, including preparing for internationalisation. The question is in which way should I do it?

For example in LineCounter.py:

def title(self):
                """ Returns the title for this checker category. """
                return "Lexikalische Statistik"

To note loose the german text, I am happy to keep it as comment. I could translate the above example to:

        def title(self):
                """ Returns the title for this checker category. """
                return ugettext("Lexical statistics")
    # _de("Lexikalische Statistik")

In the future, a search for "_de" will show where some localisation can pick up the original german text.

However, there are some not so straightforward translations. See the same file:

                try:
                        log = log + ("<br>" + `files` + " Dateien, "
                                                 + `lines` + " Zeilen, davon "
                                                 + `code_lines` + " Code ("
                                                 + `code_lines * 100 / lines` + "%), "
                                                 + `comment_lines` + " Kommentar ("
                                                 + `comment_lines * 100 / lines` + "%), "
                                                 + `coco_lines` + " beides ("
                                                 + `coco_lines * 100 / lines` + "%).\n")

I am happy to change the text to english, but it would be hard to do a later internationalisation. What about changing it to:

                try:
                        log = log + "<br>{0} files, {1} lines, from which...".format(files, lines,...)

Let me know what the preferred way is and I am happy to create a "translation" branch in my fork which later can be merged.

@nomeata
Copy link
Contributor

nomeata commented Jan 11, 2015

For now I thinks its fine to turn everything into English, and worry about internationalization only when this becomes a proper projects. The loss of the few german texts shouldn’t hurt, I think.

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

No branches or pull requests

2 participants