aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 8fe9189..9ac02d0 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -1399,9 +1399,15 @@ class Backend:
num = f.split('.')[-1]
subdir = m.get_custom_install_dir()
if subdir is None:
- subdir = os.path.join(manroot, 'man' + num)
+ if m.locale:
+ subdir = os.path.join(manroot, m.locale, 'man' + num)
+ else:
+ subdir = os.path.join(manroot, 'man' + num)
+ fname = f.fname
+ if m.locale: # strip locale from file name
+ fname = fname.replace(f'.{m.locale}', '')
srcabs = f.absolute_path(self.environment.get_source_dir(), self.environment.get_build_dir())
- dstabs = os.path.join(subdir, os.path.basename(f.fname))
+ dstabs = os.path.join(subdir, os.path.basename(fname))
i = InstallDataBase(srcabs, dstabs, m.get_custom_install_mode(), m.subproject)
d.man.append(i)