Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
rilian-la-te committed Mar 8, 2018
2 parents bfc445b + 070934e commit 8728f66
Show file tree
Hide file tree
Showing 8 changed files with 407 additions and 5 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include(GNUInstallDirs)
list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
set(GETTEXT_PACKAGE "musl-locales")
set(MUSL_LOCPATH ${CMAKE_INSTALL_DATAROOTDIR}/i18n/locales/musl CACHE PATH "Locales directory" FORCE)
set(MUSL_LOCPATH i18n/locales/musl CACHE PATH "Locales directory" FORCE)
configure_file(config.h.in config.h)
configure_file(locale.in 00locale.sh)
find_package(Intl)
Expand All @@ -16,7 +16,8 @@ endif()
target_compile_options(locale
PRIVATE $<$<COMPILE_LANGUAGE:C>:-std=gnu11 -Wno-pedantic>
)
install(PROGRAMS ${CMAKE_BINARY_DIR}/00locale.sh DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/profile.d")
install(PROGRAMS ${CMAKE_BINARY_DIR}/00locale.sh DESTINATION
"${CMAKE_INSTALL_FULL_SYSCONFDIR}/profile.d")
install(TARGETS locale DESTINATION bin)
add_subdirectory(po)
add_subdirectory(musl-po)
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@ Locale program for musl libc
This is ```/usr/bin/locale```, which works on musl libc (with limitations in musl itself).
To install, use ```cmake . && make && sudo make install``` on musl-capable distro.
English and Russian included, also .pot file.

## Build requirements:
- musl (with developer tools)
- gettext (with libintl and developer tools)
- С compiler (gcc or clang recommended)
- CMake
- CMake backend provider (make or ninja)

*For alpine, you can use this command:* ```apk add --update cmake make musl-dev gcc gettext-dev libintl```
2 changes: 1 addition & 1 deletion cmake/Translations.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ macro (add_translations_directory NLS_PACKAGE)
add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} -o ${MO_OUTPUT} ${PO_INPUT})

install (FILES ${MO_OUTPUT} DESTINATION
share/locale/${PO_INPUT_BASE}/LC_MESSAGES
${CMAKE_INSTALL_DATAROOTDIR}/locale/${PO_INPUT_BASE}/LC_MESSAGES
RENAME ${NLS_PACKAGE}.mo
COMPONENT ${ARGV1})
endforeach (PO_INPUT ${PO_FILES})
Expand Down
2 changes: 1 addition & 1 deletion cmake/TranslationsMusl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ macro (add_musl_translations_directory NLS_PACKAGE LOCPATH)
add_custom_command (TARGET musl-i18n COMMAND ${MSGFMT_EXECUTABLE} -o ${MO_OUTPUT} ${PO_INPUT})

install (FILES ${MO_OUTPUT} DESTINATION
${LOCPATH})
${CMAKE_INSTALL_DATAROOTDIR}/${LOCPATH})
endforeach (PO_INPUT ${PO_FILES})
endmacro (add_musl_translations_directory)
3 changes: 2 additions & 1 deletion musl-po/LOCALES
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
en_US
ru_RU
ru_RU
de_CH
195 changes: 195 additions & 0 deletions musl-po/ch_DE.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Language: ch_DE\n"
"X-Source-Language: C\n"

#: ../musl/musl-1.1.14/src/time/strftime.c:89
#, c-format
msgid "%2d"
msgstr ""

#: ../musl/musl-1.1.14/src/time/strftime.c:92
msgid "%Y-%m-%d"
msgstr ""

#: ../musl/musl-1.1.14/src/time/strftime.c:141
msgid "\t"
msgstr ""

#: ../musl/musl-1.1.14/src/time/strftime.c:174
#, c-format
msgid "+%lld"
msgstr ""

#: ../musl/musl-1.1.14/src/time/strftime.c:184
#, c-format
msgid "%+.2d%.2d"
msgstr ""

#: ../musl/musl-1.1.14/src/time/strftime.c:202
#, c-format
msgid "%0*lld"
msgstr ""

msgid "Sun"
msgstr ""

msgid "Mon"
msgstr ""

msgid "Tue"
msgstr ""

msgid "Wed"
msgstr ""

msgid "Thu"
msgstr ""

msgid "Fri"
msgstr ""

msgid "Sat"
msgstr ""

msgid "Sunday"
msgstr ""

msgid "Monday"
msgstr "Montag"

msgid "Tuesday"
msgstr ""

msgid "Wednesday"
msgstr ""

msgid "Thursday"
msgstr ""

msgid "Friday"
msgstr ""

msgid "Saturday"
msgstr ""

msgid "Jan"
msgstr ""

msgid "Feb"
msgstr ""

msgid "Mar"
msgstr ""

msgid "Apr"
msgstr ""

msgid "May"
msgstr ""

msgid "Jun"
msgstr ""

msgid "Jul"
msgstr ""

msgid "Aug"
msgstr ""

msgid "Sep"
msgstr ""

msgid "Oct"
msgstr ""

msgid "Nov"
msgstr ""

msgid "Dec"
msgstr ""

msgid "January"
msgstr ""

msgid "February"
msgstr ""

msgid "March"
msgstr ""

msgid "April"
msgstr ""

msgid "June"
msgstr ""

msgid "July"
msgstr ""

msgid "August"
msgstr ""

msgid "September"
msgstr ""

msgid "October"
msgstr ""

msgid "November"
msgstr ""

msgid "December"
msgstr ""

msgid "AM"
msgstr ""

msgid "PM"
msgstr ""

msgid "%a %b %e %T %Y"
msgstr ""

#: ../musl/musl-1.1.14/src/time/strptime.c:54
#: ../musl/musl-1.1.14/src/time/strftime.c:86
msgid "%m/%d/%y"
msgstr ""

#: ../musl/musl-1.1.14/src/time/strptime.c:106
#: ../musl/musl-1.1.14/src/time/strftime.c:130
msgid "%H:%M"
msgstr ""

#: ../musl/musl-1.1.14/src/time/strptime.c:115
#: ../musl/musl-1.1.14/src/time/strftime.c:143
msgid "%H:%M:%S"
msgstr ""

msgid "%I:%M:%S %p"
msgstr ""

msgid "0123456789"
msgstr ""

msgid "%a %b %e %T %Y %Z"
msgstr ""

msgid "^[yY]"
msgstr ""

msgid "^[nN]"
msgstr ""

msgid "yes"
msgstr ""

msgid "no"
msgstr ""

msgid "."
msgstr ""
1 change: 1 addition & 0 deletions po/LINGUAS
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
en_US
ru_RU
de_CH
Loading

0 comments on commit 8728f66

Please sign in to comment.