I have a Python geoprocessing tool, it is split in several Python files, When I use ArcGIS Pro to publish it as a service into the ArcGIS Server, all the dependencies are packed and deployed to the service.
Now the tool is internationalized and localized using gettext and have the following structure:
./Alignment.py ./locale/Spanish/LC_MESSAGES/Alignment.mo ./locale/Spanish/LC_MESSAGES/Alignment.po ./locale/German/LC_MESSAGES/Alignment.mo ./locale/German/LC_MESSAGES/Alignment.po
The Python files are deployed but neither *.mo nor *.po files are deployed.
How can I make that those files are included in the set of files deployed to the ArcGIS Server?
[UPDATE] If In the file Alignment.py I make a horrible hack like this i:
locale_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "locale/Spanish/LC_MESSAGES/")
the folder and its content are added to the service, but the folder structure changes a lot:
MyService.sd |-p20 |-Service | |-Alignment.py | |-lc_messages |-Alignment.mo |-Alignment.po