mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-19 06:36:50 +00:00
64d204228a
It includes the translation template files (POT) as well as translation files (PO) developer through the Transifex platform by our awesome translators. It also includes tools to generate the translation template files, generate a special translation file with the longest strigns of all translations, and a tool to download translations from Transifex into the right game folders automatically. Fixes #67 This was SVN commit r14955.
37 lines
777 B
Python
37 lines
777 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
Path handling.
|
|
|
|
We need to take into account the differences between UNIX systems and
|
|
Windows.
|
|
"""
|
|
|
|
import os
|
|
|
|
|
|
posix_sep = os.sep if os.altsep is None else os.altsep
|
|
|
|
|
|
def posix_path(fpath):
|
|
"""Convert a filesystem path to a posix path.
|
|
|
|
Always use the forward slash as a separator. For instance,
|
|
in windows the separator is the backslash.
|
|
|
|
Args:
|
|
fpath: The path to convert.
|
|
"""
|
|
return fpath if os.altsep is None else fpath.replace(os.sep, os.altsep)
|
|
|
|
|
|
def native_path(fpath):
|
|
"""Convert a filesystem path to a native path.
|
|
|
|
Use whatever separator is defined by the platform.
|
|
|
|
Args:
|
|
fpath: The path to convert.
|
|
"""
|
|
return fpath if os.altsep is None else fpath.replace(os.altsep, os.sep)
|