mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Fix of #3366
Fixed crash due to incorrect localization of the percent sign in "The %1% infill pattern is not supposed to work at 100%% density." This happens for ES, FR, IT, UK and ZH_TW localizations. Also added a new CMake target "gettext_po_to_mo" to convert all po files to mo files, and renamed the "pot" target to "gettext_make_pot".
This commit is contained in:
		
							parent
							
								
									9128ba766b
								
							
						
					
					
						commit
						692ed26091
					
				
					 11 changed files with 20 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -394,13 +394,27 @@ target_include_directories(cereal INTERFACE include)
 | 
			
		|||
 | 
			
		||||
# l10n
 | 
			
		||||
set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization")
 | 
			
		||||
add_custom_target(pot
 | 
			
		||||
add_custom_target(gettext_make_pot
 | 
			
		||||
    COMMAND xgettext --keyword=L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --debug
 | 
			
		||||
        -f "${L10N_DIR}/list.txt"
 | 
			
		||||
        -o "${L10N_DIR}/PrusaSlicer.pot"
 | 
			
		||||
    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
 | 
			
		||||
    COMMENT "Generate pot file from strings in the source tree"
 | 
			
		||||
)
 | 
			
		||||
add_custom_target(gettext_po_to_mo
 | 
			
		||||
    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
 | 
			
		||||
    COMMENT "Generate localization po files (binary) from mo files (texts)"
 | 
			
		||||
)
 | 
			
		||||
file(GLOB L10N_PO_FILES "${L10N_DIR}/*/PrusaSlicer*.po")
 | 
			
		||||
foreach(po_file ${L10N_PO_FILES})
 | 
			
		||||
    GET_FILENAME_COMPONENT(po_dir "${po_file}" DIRECTORY)
 | 
			
		||||
    SET(mo_file "${po_dir}/PrusaSlicer.mo")
 | 
			
		||||
    add_custom_command(
 | 
			
		||||
        TARGET gettext_po_to_mo PRE_BUILD
 | 
			
		||||
        COMMAND msgfmt ARGS -o ${mo_file} ${po_file}
 | 
			
		||||
        DEPENDS ${po_file}
 | 
			
		||||
    )
 | 
			
		||||
endforeach()
 | 
			
		||||
 | 
			
		||||
find_package(NLopt 1.4 REQUIRED)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -6865,7 +6865,7 @@ msgstr "Textura"
 | 
			
		|||
 | 
			
		||||
#: src/slic3r/GUI/ConfigManipulation.cpp:200
 | 
			
		||||
msgid "The %1% infill pattern is not supposed to work at 100%% density."
 | 
			
		||||
msgstr "Se supone que el patrón de relleno %1% no funciona a una densidad del 100%."
 | 
			
		||||
msgstr "Se supone que el patrón de relleno %1% no funciona a una densidad del 100%%."
 | 
			
		||||
 | 
			
		||||
#: src/slic3r/GUI/FirmwareDialog.cpp:530
 | 
			
		||||
#, possible-c-format
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -7013,7 +7013,7 @@ msgstr "Texture"
 | 
			
		|||
 | 
			
		||||
#: src/slic3r/GUI/ConfigManipulation.cpp:200
 | 
			
		||||
msgid "The %1% infill pattern is not supposed to work at 100%% density."
 | 
			
		||||
msgstr "Le modèle de remplissage %1% n'est pas censé fonctionner avec une densité de 100%."
 | 
			
		||||
msgstr "Le modèle de remplissage %1% n'est pas censé fonctionner avec une densité de 100%%."
 | 
			
		||||
 | 
			
		||||
#: src/slic3r/GUI/FirmwareDialog.cpp:530
 | 
			
		||||
#, c-format
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -6865,7 +6865,7 @@ msgstr "Texture"
 | 
			
		|||
 | 
			
		||||
#: src/slic3r/GUI/ConfigManipulation.cpp:200
 | 
			
		||||
msgid "The %1% infill pattern is not supposed to work at 100%% density."
 | 
			
		||||
msgstr "La trama di riempimento %1% non è fatta per lavorare con densità al 100%."
 | 
			
		||||
msgstr "La trama di riempimento %1% non è fatta per lavorare con densità al 100%%."
 | 
			
		||||
 | 
			
		||||
#: src/slic3r/GUI/FirmwareDialog.cpp:530
 | 
			
		||||
#, possible-c-format
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -3275,7 +3275,7 @@ msgstr "Шаблон наповнення "
 | 
			
		|||
#: src/slic3r/GUI/Tab.cpp:1309
 | 
			
		||||
#, no-c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
" infill pattern is not supposed to work at 100% density.\n"
 | 
			
		||||
" infill pattern is not supposed to work at 100%% density.\n"
 | 
			
		||||
"\n"
 | 
			
		||||
"Shall I switch to rectilinear fill pattern?"
 | 
			
		||||
msgstr ""
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -3292,7 +3292,7 @@ msgstr "這個 "
 | 
			
		|||
#: src/slic3r/GUI/Tab.cpp:1309
 | 
			
		||||
#, no-c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
" infill pattern is not supposed to work at 100% density.\n"
 | 
			
		||||
" infill pattern is not supposed to work at 100%% density.\n"
 | 
			
		||||
"\n"
 | 
			
		||||
"Shall I switch to rectilinear fill pattern?"
 | 
			
		||||
msgstr ""
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue