Skip to content
Snippets Groups Projects

Utilizar ruta absoluta si no se encuentra ruta relativa al directorio de internacionalizacion

Merged Nicolas Marcelo Vazquez Picerno requested to merge fixpath into master
1 file
+ 5
2
Compare changes
  • Side-by-side
  • Inline
@@ -24,7 +24,11 @@ __ = unsafePerformIO . getText
hgettext_locale_domain = "mate-fun" --IMPORTANT: Value should be the same as MATEFUN_MO_FILENAME value on translations.sh
hgettext_locale_dir = "internationalization" --IMPORTANT: Value should be the same as INTERNATIONALIZATION_DIR value on translations.sh
hgettext_abs_dir = getFullDir hgettext_locale_dir -- Absolute dir path
-- If relative path for internationationalization is not found on the current directory, then use the absolute path generated from the source code
hgettext_abs_dir :: String
hgettext_abs_dir = if unsafePerformIO (doesDirectoryExist hgettext_locale_dir)
then hgettext_locale_dir
else getFullDir hgettext_locale_dir
-- Helper functions
getFilePath :: String
@@ -40,4 +44,3 @@ getParentDirectory = let text = replace (pack "src/MateFun/Internationalizati
getFullDir :: String -> String
getFullDir dir = let parent = getParentDirectory
in parent ++ dir
Loading