I am having some issues with creating localization resource files for all languages for the description found in my anchor solution. I unable to use the solution packager /localize command to create localization resource files for all supported languages ar-SA bg-BG ca-ES cs-CZ da-DK de-DE el-GR en-US et-EE eu-ES fi-FI fr-FR gl-ES he-IL hi-IN hr-HR hu-HU id-ID it-IT ja-JP kk-KZ ko-KR lt-LT lv-LV ms-MY nb-NO nl-NL pl-PL pt-BR pt-PT ro-RO ru-RU sk-SK sl-SI sr-Cyrl-RS sr-Latn-RS sv-SE th-TH tr-TR uk-UA vi-VN zh-CN zh-HK zh-TW.
Running this command produces en-US resources only. Maybe there is some cli parameter I am missing?
.\SolutionPackager.exe /action:Extract /zipfile:"C:\Users\Desktop\SolutionAnchor_managed.zip" /folder:solution /localize
Running this command produces the following output:
Localizing 1 components(s)...
Localizing component: SolutionManifest
No solution component files found to localize
Writing string resources...
Removed number of duplicates: 0
WriteResxFile is complete
Managed Extract complete.
Solution packager, with the /src /loc flags will create only the languages in the solution currently.
It will also create a template resource file in the base of the resource directory that you can then copy into language specific directories ( that you create ) and localize.
When you rerun with pack and /src /loc, it will repack the languages into the solution. Subsequent extract operations will now write out all the localized folders for you.
Related
The ...info.yml:
name: CEnquire
version: '9.x-1.3'
description: BlahBlah
package: CPackage
type: module
core_version_requirement: ^8 || ^9
interface translation project: cenquire
interface translation server pattern: modules/cpackage/cenquire/translation/%project-%version.%language.po
The language: Ukrainian (uk)
The .po file is named cenquire-9.x-1.3.uk.po and placed in proper directory
drush locale-check just ignores yml data: I don't get any Translation file not found errors. The site just has no data about any translation for the project exists. This is not a cache issue.
What am I doing wrong?
Trying to write config.lua for lvim that wiil be separated in different files? that will be included in config.lua with require('<package>'). Everything works if i try i in .config/lvim/ directory, but i get below message, when i run lvim in different directory.
21:43:43 [WARN ] lvim: "Invalid configuration: /home/axr/.config/lvim/config.lua:6: module 'base/search' not found:\n\t
no field package.preload['base/search']\n\tno file './base/search.lua'\n\tno file '/usr/share/luajit-2.1.0-beta3/base/s
earch.lua'\n\tno file '/usr/local/share/lua/5.1/base/search.lua'\n\tno file '/usr/local/share/lua/5.1/base/search/init.
lua'\n\tno file '/usr/share/lua/5.1/base/search.lua'\n\tno file '/usr/share/lua/5.1/base/search/init.lua'\n\tno file '.
/base/search.so'\n\tno file '/usr/local/lib/lua/5.1/base/search.so'\n\tno file '/usr/lib/lua/5.1/base/search.so'\n\tno
file '/usr/local/lib/lua/5.1/loadall.so'" file="init.lua", line=49
Tried to replace / with ., nothing changed.
Checked runtimepath, .config/lvim/ was there.
Tried to replace relative path in require(<path>) with full path.
GitHub repository with files and comments: https://github.com/SATANalexander666/lvim-config
Dont use / or \\ in require()
Only use the . for entering a folder.
Using nvim the .config/nvim/lua folder has to be created manually.
After that it is easy doing to require Lua files.
Example
.config/nvim/init.vim # file
.config/nvim/lua/config.lua # file
.config/nvim/lua/base # folder
.config/nvim/lua/keys # folder
.config/nvim/lua/plugins/core # folder
.config/nvim/lua/plugins/packer # folder
Content of init.vim
lua require("config")
Will be appended/finished to: lua/config.lua
Refer nvim' help: :help lua-package-path
Content of config.lua
-- base
require('base.search') -- Search configs
require('base.indents') -- Indentation configs
require('base.visual') -- GUI configs
require('base.other')
-- keys
require('keys.alias') -- Shortcuts and incapsulation
require('keys.main') -- Keys for built-in features
require('keys.plugins') -- Keys for plugged features
-- plugins
require('plugins.core.use') -- Buil-in plugins that are being used
require('plugins.core.config') -- Configs for built-in plugins
require('plugins.packer.use') -- Packer pluggins that are being used
require('plugins.packer.config') -- Configs for packer plugins
The dot will be used to enter the folder(s) (Linux & Windows)
Refer nvim' help: :help lua-require
In /.config/lvim must be created folder named /lua and all folders required in main config.lua must be moved to this folder, however path to required folders shouldn't be changed. Example: require('base.search'), while actual path is /.config/lvim/lua/base/search.lua.
After following the official workflow for translating files I find myself in a situation where the translation doesn't seem to work.
make gettext
sphinx-intl update -p /source/_build/gettext -l fr
set SPHINXOPTS=-D language=fr
make html
I have successfully created *.pot and *.po files and testwise translated parts of this *.po-file (other msgid's still default to "". Then I set the language to french and run make html again - but the text that I translated isn't displayed in french.
Nothing in the build output shows any hint on what's wrong:
C:\dev\ritune\docs>make html
Sphinx v4.1.2 in Verwendung
Lade Übersetzungen [fr]…erledigt
making output directory... erledigt
[autosummary] generating autosummary for: .roles.rst, configuration\add_modules\add_modules.rst, configuration\db_dump\db_dump.rst, configuration\index.rst, configuration\modules\config_dashboard\config_dashboard.rst, configuration\modules\index.rst, configuration\plotly_diagrams\plotly_diagrams.rst, data_explorer\data_explorer.rst, functions\asset_management\asset_management.rst, functions\dashboard\dashboard.rst, ..., system\index.rst, system\logs\logs.rst, system\main_menu\main_menu.rst, system\physical\physical.rst, system\proc\proc.rst, system\settings\settings.rst, system\tags\tags.rst, system\user_profile\user_profile.rst, system\users_roles\users_roles.rst, system\versions\versions.rst
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://www.sphinx-doc.org/en/master/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 81 source files that are out of date
updating environment: [new config] 81 added, 0 changed, 0 removed
reading sources... [100%] system/versions/versions or2ntrol
looking for now-outdated files... none found
pickling environment... erledigt
checking consistency... preparing documents... erledigt
writing output... [100%] system/versions/versions r2ntrol
generating indices... genindex erledigt
writing additional pages... search erledigt
copying images... [100%] system/versions/version_numbering.svg 1fcb54c2ee.png
copying downloadable files... [ 57%] modules/reporting_masks/Betriebsstatistik_Vorlage_20210514.xlsx_Betriebsstatistik_Vorlage_20210514.xlscopying downloadable files... [100%] system/alarms/ANSI-ISA-18.2 - Management of Alarm Systems for the Process Industries.PDF
copying static files... erledigt
copying extra files... erledigt
dumping search index in French (code: fr)... erledigt
dumping object inventory... erledigt
build abgeschlossen, 13 warnings.
Note that I excluded warnings that have to do with silly syntax mistakes I made in one of the files (the one I'm currently working on).
Is this expected behaviour or am I doing something wrong? I wanted to test the translation functionality and my *.po files.
I found the solution. Sphinx didn't actually pick up on the .mo (binary) files.
Steps to retrace for correct working:
Make sure you're in root directory and you see build and source directories
Using sphinx gettext will create *.pot files in build/gettext
Take those *.pot files and translate to *.po files using sphinx-intl update -p build/gettext -l fr (example for french/'fr'). This will create *.po files in a new folder locales which by default sits amongst the build and source dirs under root.
Translate *.po files
Now make sure that locale_dirs = ['../locales'] in conf.py points to the directory of the locales! This was not set up properly by default in my case. I had to change dir to parent ( ../ ) and use "locales" instead of the default "locale" to describe the path.
Run sphinx-intl build to create binaries (*.mo) out of *.mo files.
Set language to french for current terminal: set SPHINXOPTS=-D language=fr
make html
I use vps with debian 9, mariadb 10.3.x, php7.0 (standard LAMP).
I had to do the update all packages. After remove and install and import database all charcters its look like: "Tch�rzewski"
I check encoding in database (is it set to utf8_general_ci) and all table have that same. In database i have of course correct version of strings.
I also check locale this is output:
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=pl_PL.UTF-8
LANGUAGE=
LC_CTYPE="UTF-8"
LC_NUMERIC="UTF-8"
LC_TIME="UTF-8"
LC_COLLATE="UTF-8"
LC_MONETARY="UTF-8"
LC_MESSAGES="UTF-8"
LC_PAPER="UTF-8"
LC_NAME="UTF-8"
LC_ADDRESS="UTF-8"
LC_TELEPHONE="UTF-8"
LC_MEASUREMENT="UTF-8"
LC_IDENTIFICATION="UTF-8"
LC_ALL=UTF-8
I check every file (have meta utf-8) and in php in files i have ini_set('default_charset', 'utf-8')
I try with
header("Content-Type: text/html; charset=utf-8");
but this didnt help
What can i do now? I can reinstall server but I dont want to waste a lot of time for that
I am solved problem with add to PDO mysql-attr_init_command. Now all pdo commands looks like:
$db = new PDO('mysql:host='._DBHOST_.';port=8889;dbname='._DBNAME_, _DBUSER_, _DBPASS_,
array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'"));
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
I have an OTP application. So far, I have two configuration files: rebar.config and config/vm.args, the latter of which is referenced in the former: {vm_args, "config/vm.args"}.
In the lager documentation: https://github.com/erlang-lager/lager
There is mention of another configuration file: app.config. Where does this file go and how do I reference it from my rebar config? In /src or at the root of the application? I ask because I tried adding that lager section in my rebar.config and that didn't do anything: lager is still operating with the defaults. So I probably need this app.config.
OK figured this out. In Rebar you can specify sys.config: https://www.rebar3.org/docs/releases
So I have a new file config/sys.config and my relx section now reads:
{relx, [
{release,
{myapp,"3.4.1"},
[myapp]
},
%{extend_start_script,true},
%
%for the following two fancyiness see https://www.rebar3.org/docs/releases
%Supply our own vm.args
{vm_args, "config/vm.args"},
%supply our own application configuration
{sys_config, "config/sys.config"}
]}.