properly translatable plural forms
This commit is contained in:
parent
7c24957d30
commit
8ab69cba58
|
@ -17,4 +17,8 @@
|
|||
*/
|
||||
#define S_(Text) PBD::sgettext (PACKAGE, Text)
|
||||
|
||||
/** Use this to translate strings with plural forms
|
||||
*/
|
||||
#define P_(Singular,Plural,HowMany) dngettext (PACKAGE, (Singular), (Plural), (HowMany))
|
||||
|
||||
#endif // __i18n_h__
|
||||
|
|
|
@ -74,9 +74,10 @@ MidiPatchManager::add_midnam_files_from_directory(const std::string& directory_p
|
|||
vector<std::string> result;
|
||||
find_files_matching_pattern (result, directory_path, "*.midnam");
|
||||
|
||||
info << string_compose(_("Loading %1 MIDI patches from %2"),
|
||||
result.size(),
|
||||
directory_path) << endmsg;
|
||||
info << string_compose(
|
||||
P_("Loading %1 MIDI patch from %2", "Loading %1 MIDI patches from %2", result.size()),
|
||||
result.size(), directory_path)
|
||||
<< endmsg;
|
||||
|
||||
for (vector<std::string>::const_iterator i = result.begin(); i != result.end(); ++i) {
|
||||
add_midi_name_document (*i);
|
||||
|
@ -104,9 +105,10 @@ MidiPatchManager::remove_midnam_files_from_directory(const std::string& director
|
|||
vector<std::string> result;
|
||||
find_files_matching_pattern (result, directory_path, "*.midnam");
|
||||
|
||||
info << string_compose(_("Unloading %1 MIDI patches from %2"),
|
||||
result.size(),
|
||||
directory_path) << endmsg;
|
||||
info << string_compose(
|
||||
P_("Unloading %1 MIDI patch from %2", "Unloading %1 MIDI patches from %2", result.size()),
|
||||
result.size(), directory_path)
|
||||
<< endmsg;
|
||||
|
||||
for (vector<std::string>::const_iterator i = result.begin(); i != result.end(); ++i) {
|
||||
remove_midi_name_document (*i);
|
||||
|
|
Loading…
Reference in New Issue
Block a user