mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 16:49:41 +02:00
Add `locale/en.po` file. Add English to `locale/LINGUAS` list. Partially duplicate `msgid`s to `msgstr`s in English locale enable eventual key `msgid` changes Replace former project name with Tenacity in English locale. Replace former project website with Tenacity compatible usages in English locale. Modify `AboutDialog.h` by renaming variables. Modify `AboutDialog.cpp` by replacing usage of pre-fork name in Strings. Modify AddBuildInfoRow methods to be static in About dialog. Make License text const in About dialog. Make pre-fork credits different in About dialog. Begin adding Tenacity specific credits Macros starting with `__` are reserved, so I removed the `__` on the About Dialog guard macro. Remove `AboutDialog::` from usage of `Role` in `AboutDialog.h` Refactor overly long generator method into separate methods in `AboutDialog.(h|cpp)` Begin adding Tenacity developer information Cleanup layout of `AboutDialog.h` and `AboutDialog.cpp` Add `safedelete` macro to compliment odd `safenew` macro Add `enum` to `ShuttleGui.cpp` to make it more clear what `Prop` method is doing. Remove a ton of pointless and/or redunant `#ifdef` usage Remove pointless singleton in AboutDialog Make AboutDialog modal on MacOS Fix reference type use of `auto` in `AudacityApp` b/c it makes unintentional copy. Update XPM and PNG images using Tenacity assets Update ICO images using Tenacity assets. Fix Windows resource script that improperly used `winuser.h` import. Add `*.aps` to gitignore to prevent IDE RC pre-load file from being committed. Add default values for pre-processor constants in `tenacity.rc`. Make changes needed for `Tenacity.exe` binary Add 8x8 PNG to Windows ICO files Replace project name in various CMake and CPack file. Replace project name in various directory structures. Replace project name in various OS-specific build files. Replace project name in various documentation files. Update the PO and POT files using the script. Fix places where a `.desktop` file was used on Linux. Replace title of project windows. Make splash screen click through to `tenacityaudio.org`. Remove ® from `AboutDialog.cpp` Modify copyright message in `AboutDialog.cpp` Signed-off-by: Emily Mabrey <emilymabrey93@gmail.com>
89 lines
2.3 KiB
CMake
Executable File
89 lines
2.3 KiB
CMake
Executable File
set( TARGET locale )
|
|
set( TARGET_ROOT ${topdir}/locale )
|
|
|
|
message( STATUS "========== Configuring ${TARGET} ==========" )
|
|
|
|
def_vars()
|
|
|
|
# Load the list of catalogs
|
|
file( STRINGS ${TARGET_ROOT}/LINGUAS SOURCES )
|
|
list( TRANSFORM SOURCES APPEND ".po" )
|
|
|
|
# Look for gettext
|
|
find_package( Gettext QUIET )
|
|
if( GETTEXT_FOUND )
|
|
mark_as_advanced( FORCE GETTEXT_MSGFMT_EXECUTABLE )
|
|
mark_as_advanced( FORCE GETTEXT_MSGMERGE_EXECUTABLE )
|
|
set( msgfmt "${GETTEXT_MSGFMT_EXECUTABLE}" )
|
|
elseif( PYTHON )
|
|
set( msgfmt "${PYTHON}" "${TARGET_ROOT}/msgfmt.py" )
|
|
elseif( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
|
nuget_package( pkgdir "Gettext.Tools" "0.20.1.1" )
|
|
file( TO_NATIVE_PATH "${pkgdir}/tools/bin/msgfmt.exe" msgfmt )
|
|
endif()
|
|
|
|
if( NOT DEFINED msgfmt )
|
|
message( WARNING "The msgfmt program wasn't found...translations will not be provided." )
|
|
return()
|
|
endif()
|
|
|
|
if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
|
set( locale "${_DEST}/Resources" )
|
|
elseif( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
|
set( locale "${_DEST}/Languages" )
|
|
else()
|
|
set( locale "${_DEST}/locale" )
|
|
endif()
|
|
|
|
set( OUTPUTS )
|
|
foreach( source ${SOURCES} )
|
|
get_filename_component( lang "${source}" NAME_WE )
|
|
|
|
if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
|
set( dst "${locale}/${lang}.lproj" )
|
|
elseif( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
|
set( dst "${locale}/${lang}" )
|
|
else()
|
|
set( dst "${locale}/${lang}/LC_MESSAGES" )
|
|
endif()
|
|
|
|
set( po "${_SRCDIR}/${source}" )
|
|
set( mo "${dst}/audacity.mo" )
|
|
|
|
add_custom_command(
|
|
DEPENDS
|
|
"${po}"
|
|
COMMAND
|
|
"${CMAKE_COMMAND}" -E make_directory "${dst}"
|
|
COMMAND
|
|
${msgfmt} -o "${mo}" "${po}"
|
|
OUTPUT
|
|
"${mo}"
|
|
)
|
|
|
|
# Always make sure there's an empty English folder. Otherwise, some menu
|
|
# items will be translated to the next language listed in System
|
|
# Preferences/Language & Text
|
|
# if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
|
# add_custom_command(
|
|
# COMMAND
|
|
# ${CMAKE_COMMAND} -E make_directory "${_DEST}/Resources/en.lproj"
|
|
# OUTPUT
|
|
# "${mo}"
|
|
# APPEND
|
|
# )
|
|
# endif()
|
|
|
|
list( APPEND OUTPUTS ${mo} )
|
|
endforeach()
|
|
|
|
add_custom_target( "${TARGET}" ALL DEPENDS ${OUTPUTS} SOURCES "${SOURCES}" )
|
|
|
|
if( NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
|
if( NOT WIN32)
|
|
install( DIRECTORY ${locale}/
|
|
TYPE LOCALE )
|
|
endif()
|
|
endif()
|
|
|