Skip to content

Commit 2c4921c

Browse files
committed
defines: Rename PACKAGE to I18N_PACKAGE
This kind of "package" concept is actually used to control which translation file to use. That is far from obvious from the name PACKAGE. Consistently calling it I18N_PACKAGE gives a much better hint. This concept was already called I18N_PACKAGE in some places - now use the same name in wscript and in the final DEFINE. This change also makes it more obvious that something is odd with all the different I18N_PACKAGE names for various modules, while ardour actually only has 3 translation files. This is mainly a simple global search/replace with thorough review and a few manual tweaks.
1 parent 2874c23 commit 2c4921c

File tree

87 files changed

+172
-172
lines changed

Some content is hidden

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

87 files changed

+172
-172
lines changed

MSVCardour3/Ardour3.vcproj

+3-3
Large diffs are not rendered by default.

MSVCvst_scan/MSVCvst3_scan.vcproj

+3-3
Large diffs are not rendered by default.

MSVCvst_scan/MSVCvst_scan.vcproj

+3-3
Large diffs are not rendered by default.

gtk2_ardour/main.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -296,15 +296,15 @@ int main (int argc, char *argv[])
296296
#if ENABLE_NLS
297297

298298
#ifndef NDEBUG
299-
cerr << "bind txt domain [" << PACKAGE << "] to " << localedir << endl;
299+
cerr << "bind txt domain [" << I18N_PACKAGE << "] to " << localedir << endl;
300300
#endif
301301

302-
(void) bindtextdomain (PACKAGE, localedir.c_str());
302+
(void)bindtextdomain (I18N_PACKAGE, localedir.c_str ());
303303
/* our i18n translations are all in UTF-8, so make sure
304304
that even if the user locale doesn't specify UTF-8,
305305
we use that when handling them.
306306
*/
307-
(void) bind_textdomain_codeset (PACKAGE,"UTF-8");
307+
(void)bind_textdomain_codeset (I18N_PACKAGE, "UTF-8");
308308
#endif
309309

310310
pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, 0);

gtk2_ardour/wscript

+3-3
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ def build(bld):
529529
]
530530
obj.defines = [
531531
'NOMAIN',
532-
'PACKAGE="' + I18N_PACKAGE + '"',
532+
'I18N_PACKAGE="' + I18N_PACKAGE + '"',
533533
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
534534
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
535535
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
@@ -591,7 +591,7 @@ def build(bld):
591591
# ]
592592
# obj.defines = [
593593
# 'NOMAIN',
594-
# 'PACKAGE="' + I18N_PACKAGE + '"',
594+
# 'I18N_PACKAGE="' + I18N_PACKAGE + '"',
595595
# 'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
596596
# 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
597597
# 'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
@@ -631,7 +631,7 @@ def build(bld):
631631
]
632632

633633
obj.defines = [
634-
'PACKAGE="' + I18N_PACKAGE + '"',
634+
'I18N_PACKAGE="' + I18N_PACKAGE + '"',
635635
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
636636
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
637637
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',

libs/aaf/wscript

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def build(bld):
6060
#obj.uselib = 'GLIB'
6161
obj.vnum = LIBAAF_LIB_VERSION
6262
obj.install_path = bld.env['LIBDIR']
63-
obj.defines += [ 'PACKAGE="' + I18N_PACKAGE + '"', '_POSIX_C_SOURCE=200809L', '_XOPEN_SOURCE=500' ]
63+
obj.defines += [ 'I18N_PACKAGE="' + I18N_PACKAGE + '"', '_POSIX_C_SOURCE=200809L', '_XOPEN_SOURCE=500' ]
6464

6565
def shutdown():
6666
autowaf.shutdown()

libs/ardour/MSVClibardour/ardour.vcproj

+3-3
Large diffs are not rendered by default.

libs/ardour/globals.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -634,8 +634,8 @@ ARDOUR::init (bool try_optimization, const char* localedir, bool with_gui)
634634
Temporal::init ();
635635

636636
#if ENABLE_NLS
637-
(void)bindtextdomain (PACKAGE, localedir);
638-
(void)bind_textdomain_codeset (PACKAGE, "UTF-8");
637+
(void)bindtextdomain (I18N_PACKAGE, localedir);
638+
(void)bind_textdomain_codeset (I18N_PACKAGE, "UTF-8");
639639
#endif
640640

641641
SessionEvent::init_event_pool ();

libs/ardour/test/test_util.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ test_search_path ()
144144
std::string
145145
new_test_output_dir (std::string prefix)
146146
{
147-
return PBD::tmp_writable_directory (PACKAGE, prefix);
147+
return PBD::tmp_writable_directory (I18N_PACKAGE, prefix);
148148
}
149149

150150
int

libs/ardour/wscript

+5-5
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ def build(bld):
421421
obj.vnum = LIBARDOUR_LIB_VERSION
422422
obj.install_path = bld.env['LIBDIR']
423423
obj.defines += [
424-
'PACKAGE="' + I18N_PACKAGE + bld.env['MAJOR'] + '"',
424+
'I18N_PACKAGE="' + I18N_PACKAGE + bld.env['MAJOR'] + '"',
425425
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
426426
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
427427
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
@@ -610,7 +610,7 @@ def build(bld):
610610
else:
611611
testcommon.use.extend(['libltc', 'librubberband', 'libfluidsynth'])
612612
testcommon.defines = [
613-
'PACKAGE="libardour' + bld.env['MAJOR'] + 'test"',
613+
'I18N_PACKAGE="libardour' + bld.env['MAJOR'] + 'test"',
614614
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
615615
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
616616
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
@@ -686,7 +686,7 @@ def build(bld):
686686
load_save_session.target = 'load-save-session'
687687
load_save_session.install_path = ''
688688
load_save_session.defines = [
689-
'PACKAGE="libardour' + bld.env['MAJOR'] + 'profile"',
689+
'I18N_PACKAGE="libardour' + bld.env['MAJOR'] + 'profile"',
690690
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
691691
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
692692
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
@@ -712,7 +712,7 @@ def build(bld):
712712
profilingobj.target = p
713713
profilingobj.install_path = ''
714714
profilingobj.defines = [
715-
'PACKAGE="libardour' + bld.env['MAJOR'] + 'profile"',
715+
'I18N_PACKAGE="libardour' + bld.env['MAJOR'] + 'profile"',
716716
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
717717
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
718718
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
@@ -730,7 +730,7 @@ def create_ardour_test_program(bld, includes, name, target, sources):
730730
# not sure about install path
731731
testobj.install_path = bld.env['LIBDIR']
732732
testobj.defines = [
733-
'PACKAGE="libardour' + bld.env['MAJOR'] + 'test"',
733+
'I18N_PACKAGE="libardour' + bld.env['MAJOR'] + 'test"',
734734
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
735735
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
736736
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',

libs/audiographer/MSVCaudiographer/audiographer.vcproj

+3-3
Large diffs are not rendered by default.

libs/auscan/wscript

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def build(bld):
1919
obj.defines = [
2020
'AU_SCANNER_APP',
2121
'VERSIONSTRING="' + bld.env['VERSION'] + '"',
22-
'PACKAGE="' + I18N_PACKAGE + bld.env['MAJOR'] + '"',
22+
'I18N_PACKAGE="' + I18N_PACKAGE + bld.env['MAJOR'] + '"',
2323
'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"',
2424
'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
2525
]

0 commit comments

Comments
 (0)