Ubuntu is having issues if braces are in path (nw)

This commit is contained in:
Miodrag Milanovic 2016-02-21 13:17:59 +01:00
parent d4b6d7ea66
commit fafa333e3f
9 changed files with 5 additions and 6 deletions

View File

@ -1279,12 +1279,8 @@ else
endif
%.mo: %.po
ifeq (posix,$(SHELLTYPE))
@echo "Converting translation $<..."
else
@echo Converting translation $<...
endif
$(SILENT) msgfmt --check --output-file "$@" $<
$(SILENT) msgfmt --check --output-file $@ $<
#-------------------------------------------------
# Regression tests

View File

@ -39,6 +39,8 @@ void load_translation(emu_options &m_options)
emu_file file(m_options.language_path(), OPEN_FLAG_READ);
auto name = std::string(m_options.language());
strreplace(name, " ", "_");
strreplace(name, "(", "");
strreplace(name, ")", "");
if (file.open(name.c_str(), PATH_SEPARATOR "strings.mo") == FILERR_NONE)
{
UINT64 size = file.size();

View File

@ -33,7 +33,8 @@ ui_menu_custom_ui::ui_menu_custom_ui(running_machine &machine, render_container
if (dirent->type == ENTTYPE_DIR && strcmp(dirent->name, ".") != 0 && strcmp(dirent->name, "..") != 0)
{
auto name = std::string(dirent->name);
strreplace(name, "_", " ");
int i = strreplace(name, "_", " (");
if (i > 0) name = name.append(")");
m_lang.push_back(name);
if (strcmp(name.c_str(), lang) == 0)
m_currlang = cnt;