[nautilus-actions] nautilus-actions-new: factorize error message
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] nautilus-actions-new: factorize error message
- Date: Mon, 17 May 2010 18:28:07 +0000 (UTC)
commit ee530004053430ac77c0ab82ec51b9ea7b6283c8
Author: Pierre Wieser <pwieser trychlos org>
Date: Mon May 17 05:55:33 2010 +0200
nautilus-actions-new: factorize error message
ChangeLog | 3 +++
src/utils/nautilus-actions-new.c | 10 ++++++----
2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index dd3fec7..0fd5310 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2010-05-17 Pierre Wieser <pwieser trychlos org>
+ * src/utils/nautilus-actions-new.c:
+ Factorize error message to make translation easier.
+
* src/utils/nautilus-actions-run.c:
Mark two new strings for translation.
diff --git a/src/utils/nautilus-actions-new.c b/src/utils/nautilus-actions-new.c
index b922b24..ffb6bba 100644
--- a/src/utils/nautilus-actions-new.c
+++ b/src/utils/nautilus-actions-new.c
@@ -140,6 +140,8 @@ static GOptionEntry misc_entries[] = {
{ NULL }
};
+#define CANNOT_BOTH _( "Error: '%s' and '%s' options cannot both be specified.\n" )
+
static GOptionEntry *build_option_entries( const ArgFromDataDef *defs, guint nbdefs, const GOptionEntry *adds, guint nbadds );
static GOptionContext *init_options( void );
static NAObjectAction *get_action_from_cmdline( void );
@@ -192,26 +194,26 @@ main( int argc, char** argv )
}
if( enabled && disabled ){
- g_printerr( _( "Error: '--enabled' and '--disabled' options cannot both be specified.\n" ));
+ g_printerr( CANNOT_BOTH, "--enabled", "--disabled" );
errors += 1;
} else if( !disabled ){
enabled = TRUE;
}
if( target_selection && nocontext ){
- g_printerr( _( "Error: '--context' and '--nocontext' options cannot both be specified.\n" ));
+ g_printerr( CANNOT_BOTH, "--context", "--nocontext" );
errors += 1;
} else if( !nocontext ){
target_selection = TRUE;
}
if( target_toolbar && notoolbar ){
- g_printerr( _( "Error: '--toolbar' and '--notoolbar' options cannot both be specified.\n" ));
+ g_printerr( CANNOT_BOTH, "--toolbar", "--notoolbar" );
errors += 1;
}
if( matchcase && nocase ){
- g_printerr( _( "Error: '--match-case' and '--nocase' options cannot both be specified.\n" ));
+ g_printerr( CANNOT_BOTH, "--match-case", "--nocase" );
errors += 1;
} else if( !nocase ){
matchcase = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]