Ren'Py Translator ToolKit  Check-in [8baeb91844]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Select both .po and .mo also in non-Windows platforms
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:8baeb91844f15ee89fd4456f03de081beeb304d2b16ab7caf2d13fbb5360dc7e
User & Date: Beuc 2020-07-10 14:40:41
Context
2020-07-10
14:41
Doc fix check-in: 1221b529f8 user: Beuc tags: trunk
14:40
Select both .po and .mo also in non-Windows platforms check-in: 8baeb91844 user: Beuc tags: trunk
12:13
Embed .po->.mo converter check-in: c258600aaa user: Beuc tags: trunk
Changes

Changes to game/choose_file.rpy.

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
            try:
                default_path = os.path.dirname(os.path.abspath(config.renpy_base))
            except:
                default_path = os.path.abspath(config.renpy_base)

        if EasyDialogs:

            choice = EasyDialogs.AskFileForOpen(defaultLocation=default_path, wanted=unicode, typeList=[('Translation Catalogs (*.po,*.mo)', '*.po;*.mo'), ('All Files (*.*)', '*.*')])

            if choice is not None:
                path = choice
            else:
                path = None

        else:







|







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
            try:
                default_path = os.path.dirname(os.path.abspath(config.renpy_base))
            except:
                default_path = os.path.abspath(config.renpy_base)

        if EasyDialogs:

            choice = EasyDialogs.AskFileForOpen(defaultLocation=default_path, wanted=unicode, typeList=[('Message Catalogs (*.po,*.mo)', '*.po;*.mo'), ('All Files (*.*)', '*.*')])

            if choice is not None:
                path = choice
            else:
                path = None

        else:

Changes to game/tkaskopenfilename.py.

42
43
44
45
46
47
48
49
50
51
52
53
54

# Create the TK canvas.

if __name__ == "__main__":
    root = Tk()
    root.withdraw()

    result = askopenfilename(initialdir=sys.argv[1], parent=root, title="Select compiled MO catalog", filetypes=((".mo","*.mo"),("all files","*.*")))

    if result == ():
        result = ""

    sys.stdout.write(result.encode("utf8"))







|





42
43
44
45
46
47
48
49
50
51
52
53
54

# Create the TK canvas.

if __name__ == "__main__":
    root = Tk()
    root.withdraw()

    result = askopenfilename(initialdir=sys.argv[1], parent=root, title="Select message catalog", filetypes=(("Message catalog","*.po *.mo"),("all files","*.*")))

    if result == ():
        result = ""

    sys.stdout.write(result.encode("utf8"))