Skip to content

Commit c5926ea

Browse files
committed
Merge branch 'dev'
Conflicts: CMakeLists.txt
2 parents 951e662 + 212fd6b commit c5926ea

File tree

3,050 files changed

+126633
-171776
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,050 files changed

+126633
-171776
lines changed

.gitignore

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22
CMakeFiles/
33
Makefile
44
cmake_install.cmake
5-
levels/CMakeFiles/
6-
levels/Makefile
7-
levels/cmake_install.cmake
8-
levels/levels_i18n/
5+
levels-po/
6+
help-po/

CMakeLists.txt

+8-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ install(DIRECTORY icons DESTINATION ${COLOBOT_INSTALL_DATA_DIR})
1414
install(DIRECTORY models DESTINATION ${COLOBOT_INSTALL_DATA_DIR})
1515
install(DIRECTORY sounds DESTINATION ${COLOBOT_INSTALL_DATA_DIR})
1616
install(DIRECTORY textures DESTINATION ${COLOBOT_INSTALL_DATA_DIR})
17+
install(DIRECTORY DESTINATION ${COLOBOT_INSTALL_DATA_DIR}/mods) # Empty directory
18+
19+
set(DATA_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
20+
set(DATA_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
1721

1822
add_subdirectory(help)
1923
add_subdirectory(levels)
20-
add_subdirectory(music)
24+
25+
if(EXISTS music)
26+
add_subdirectory(music)
27+
endif()

LICENSE LICENSE.txt

File renamed without changes.

README.i18n.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ Helpfiles are divided in two categories:
2121
programs, etc. These are stored in levels/$level/help/.
2222

2323
Helpfiles have their source in english, always stored in the E/
24-
subdirectory. To ensure retro-compatibility, existing translations have
25-
not been integrated in the gettext-based translation mechanisms and are
26-
stored in their respective one-character directories. New translations
27-
snd updates to existing ones should really use the gettext-based
28-
translation.
24+
subdirectory. Every other language directory is dynamically generated in the build process from files in level's po/ directory.
2925

3026
## Colobot syntax
3127

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ Some details of how data file translation is achieved can be found in
2626

2727
The source code contained here was released by Epsitec -- the original
2828
creator of the game -- on open source (GPLv3) license. The code was
29-
given and the rights granted specifically to PPC community in
29+
given and the rights granted specifically to ICC community in
3030
March 2012. Since then, we have been modifying the code and working on
31-
our goals, which are briefly summed up below.
31+
our goals. For more info, see [README.md in the main repository](https://github.com/colobot/colobot/blob/master/README.md)

help/CMakeLists.txt

+26-27
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
11
cmake_minimum_required(VERSION 2.8)
22

3-
set(LEVELS_I18N_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../levels-i18n/)
3+
include(../i18n-tools/CommonI18N.cmake)
4+
include(../i18n-tools/HelpI18N.cmake)
45

5-
# Handle all help categories' translations
6-
foreach(LEVEL_CODENAME cbot;object)
7-
set(SCENEFILE)
8-
set(SCENEDEST)
9-
set(PODIR "${LEVEL_CODENAME}/po/")
10-
set(HELPDIR "${LEVEL_CODENAME}/")
11-
set(HELPDEST "${LEVEL_CODENAME}")
12-
message(STATUS "Managing translations for '${LEVEL_CODENAME}' help category")
13-
include(${LEVELS_I18N_PATH}/CMakeLists.txt)
14-
endforeach()
6+
set(HELP_INSTALL_DATA_DIR ${COLOBOT_INSTALL_DATA_DIR}/help)
157

16-
set(LEVEL_CODENAME generic)
17-
set(SCENEFILE)
18-
set(SCENEDEST)
19-
set(PODIR "${LEVEL_CODENAME}/po/")
20-
set(HELPDIR "${LEVEL_CODENAME}/")
21-
set(HELPDEST "")
22-
message(STATUS "Managing translations for '${LEVEL_CODENAME}' help category")
23-
include(${LEVELS_I18N_PATH}/CMakeLists.txt)
8+
##
9+
# Add help category directory
10+
##
11+
function(add_help_category help_category_dir install_dest_dir)
12+
file(GLOB help_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${help_category_dir}/E/*.txt)
13+
list(SORT help_files)
14+
if(PO4A AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${help_category_dir}/po/)
15+
generate_help_i18n(translated_help_dirs
16+
"${help_files}"
17+
${help_category_dir}/po
18+
${DATA_BINARY_DIR}/help-po/${help_category_dir})
19+
else()
20+
set(translated_help_dirs "")
21+
endif()
22+
install(DIRECTORY ${help_category_dir}/E/ DESTINATION ${HELP_INSTALL_DATA_DIR}/E/${install_dest_dir})
23+
foreach(translated_help_dir ${translated_help_dirs})
24+
install(DIRECTORY ${DATA_BINARY_DIR}/help-po/${help_category_dir}/${translated_help_dir}/ DESTINATION ${HELP_INSTALL_DATA_DIR}/${translated_help_dir}/${install_dest_dir})
25+
endforeach()
26+
endfunction()
2427

25-
set(LEVEL_CODENAME bots)
26-
set(SCENEFILE)
27-
set(SCENEDEST)
28-
set(PODIR "${LEVEL_CODENAME}/po/")
29-
set(HELPDIR "${LEVEL_CODENAME}/")
30-
set(HELPDEST "object/")
31-
message(STATUS "Managing translations for '${LEVEL_CODENAME}' help category")
32-
include(${LEVELS_I18N_PATH}/CMakeLists.txt)
3328

29+
add_help_category(bots "object")
30+
add_help_category(cbot "cbot")
31+
add_help_category(generic "")
32+
add_help_category(object "object")

help/bots/D/botfc.txt

-20
This file was deleted.

help/bots/D/botfj.txt

-22
This file was deleted.

help/bots/D/botfr.txt

-20
This file was deleted.

help/bots/D/botfs.txt

-20
This file was deleted.

help/bots/D/botgc.txt

-33
This file was deleted.

help/bots/D/botgj.txt

-35
This file was deleted.

help/bots/D/botgr.txt

-33
This file was deleted.

help/bots/D/botgs.txt

-34
This file was deleted.

help/bots/D/botoc.txt

-18
This file was deleted.

help/bots/D/botoj.txt

-20
This file was deleted.

help/bots/D/botor.txt

-19
This file was deleted.

0 commit comments

Comments
 (0)