Skip to content
This repository has been archived by the owner on Aug 29, 2020. It is now read-only.

L10n #9

Closed
wants to merge 6 commits into from
Closed

L10n #9

wants to merge 6 commits into from

Conversation

Deledrius
Copy link
Member

These changes fix the file encoding on all files to fix exceptions in xKI.py when loading the game using a language other than English.

Also included is a fix to another python exception thrown when a text note is displayed on an imager containing non-ascii characters (such as the default Neighborhood Visitors note in French).

@diafero
Copy link
Member

diafero commented Aug 23, 2011

Is it necessary to add the BOM everywhere? Python should default to UTF-8, shouldn't it?

@Deledrius
Copy link
Member Author

Back when I did this, I tested it both ways and there was something that had trouble without it. Can't recall what it was.

@dpogue
Copy link
Member

dpogue commented Oct 16, 2011

I'd be more in favour of adding the "magic comment" to the top of every file rather than a BOM. Python defaults to ASCII, but adding the BOM causes issues with easy source browsing on github (unless the first commit is incorrect).

The magic comment:

# -*- coding: utf-8 -*-

@dpogue
Copy link
Member

dpogue commented Oct 25, 2011

@Hoikas Can you take a look at 3dbffc9 and 0b4748d? I have a feeling you might have either already fixed these for unicode chat, or will at least know if they look correct.

@Hoikas
Copy link
Member

Hoikas commented Oct 25, 2011

Sure...

On a quick once over, we need to make sure that xCensor supports unicode objects (or just remove xCensor entirely because it sucks). The insertStringW function is the right way to go for unicode objects, fore sure. Also, we should be lowering the input chat message in xKI before we test it with the localized commands. My input branch causes the caps lock key to actually function correctly, so we need to handle all caps commands.

@diafero
Copy link
Member

diafero commented Oct 25, 2011

You mean the capslock now applies to the chat messages as well? IMHO that's a bug, it should not. I do not want to constantly turn it off and on if I want to run around, and not scream at people.

@Hoikas
Copy link
Member

Hoikas commented Oct 25, 2011

It's a bug when capslock doesn't make text in all caps. I can't be held responsible for Cyan's poor design decision to use caps lock as the runlock key.

@diafero
Copy link
Member

diafero commented Oct 25, 2011

Not, it is not, since caps lock is part of the game mechanics and is used to toggle "run always" mode. You/we may not be responsible for Cyan's design decisions, but we are responsible for at least not breaking existing functionality.

If you really want this, then please change the run mode key. I always have capslock enabled when I play Uru, since the avatar is way to slow otherwise, and I do not want to disable it for each chat message I send.

Making capslock "work" for text in-game makes things worse, not better. Technically it might be a fix, but from a user experience point of view, it's definitely not - user experience is (partially) broken by this change. And user experience always outweighs technical considerations the user just does not care about.

Deledrius pushed a commit to Deledrius/moul-scripts that referenced this pull request Jan 19, 2012
@Deledrius Deledrius mentioned this pull request Jan 19, 2012
@Deledrius Deledrius closed this in 1de57c1 Jan 20, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants