* This file defines a number of strings used in user interfaces
*/
+/* A helper macro that will expand to either of the arguments
+ depanding on platform. The arguments are supposed to be:
+ 1. dir: a string containing "directory"
+ 2. folder: a string with the same meaning but with directory
+ substituted with "folder"
+*/
+#if defined( WIN32 ) || defined(__APPLE__)
+ #define I_DIR_OR_FOLDER( dir, folder ) folder
+#else
+ #define I_DIR_OR_FOLDER( dir, folder ) dir
+#endif
+
/*************** Open dialogs **************/
#define I_OP_OPF N_("Quick &Open File...")
#define I_OP_ADVOP N_("&Advanced Open...")
-#define I_OP_OPDIR N_("Open &Directory...")
-
+#define I_OP_OPDIR I_DIR_OR_FOLDER( N_("Open D&irectory..."), \
+ N_("Open &Folder...") )
#define I_OP_SEL_FILES N_("Select one or more files to open")
+#define I_OP_SEL_DIR I_DIR_OR_FOLDER( N_("Select Directory"), N_("Select Folder") )
/******************* Menus *****************/
#define I_POP_DEL N_("Delete")
#define I_POP_INFO N_("Information...")
#define I_POP_SORT N_("Sort")
-#define I_POP_NEWFOLDER N_("Create Folder...")
+#define I_POP_NEWFOLDER I_DIR_OR_FOLDER( N_("Create Directory..."), \
+ N_("Create Folder...") )
+#define I_POP_EXPLORE I_DIR_OR_FOLDER( N_("Show Containing Directory..."), \
+ N_("Show Containing Folder...") )
#define I_POP_STREAM N_("Stream...")
#define I_POP_SAVE N_("Save...")
-#define I_POP_EXPLORE N_("Show Containing Folder...")
+
/*************** Playlist *************/
#define I_PL_ADDF N_("Add File...")
#define I_PL_ADVADD N_("Advanced Open...")
-#define I_PL_ADDDIR N_("Add Folder...")
+#define I_PL_ADDDIR I_DIR_OR_FOLDER( N_("Add Directory..."), \
+ N_("Add Folder...") )
#define I_PL_SAVE N_("Save Playlist to &File...")
#define I_PL_LOAD N_("Open Play&list...")
#include "dialogs/open.hpp"
#include "dialogs_provider.hpp" /* Open Subtitle file */
#include "util/qt_dirs.hpp"
+#include <vlc_intf_strings.h>
#include <QFileDialog>
#include <QDialogButtonBox>
#include <QUrl>
#include <QStringListModel>
-#define I_DEVICE_TOOLTIP N_("Select the device or the VIDEO_TS directory")
+
+#define I_DEVICE_TOOLTIP \
+ I_DIR_OR_FOLDER( N_("Select a device or a VIDEO_TS directory"), \
+ N_("Select a device or a VIDEO_TS folder") )
static const char *psz_devModule[] = { "v4l", "v4l2", "pvr", "dvb", "bda",
"dshow", "screen", "jack" };
#include <QMenu>
#include <QApplication>
#include <QSettings>
+#include <QUrl>
+#include <QFileInfo>
+#include <QDesktopServices>
+#include <QInputDialog>
#include "sorting.h"
+#define I_NEW_DIR \
+ I_DIR_OR_FOLDER( N_("Create Directory"), N_( "Create Folder" ) )
+#define I_NEW_DIR_NAME \
+ I_DIR_OR_FOLDER( N_( "Enter name for new directory:" ), \
+ N_( "Enter name for new folder:" ) )
+
QIcon PLModel::icons[ITEM_TYPE_NUMBER];
/*************************************************************************
THEDP->streamingDialog( NULL, mrls[0] );
}
-#include <QUrl>
-#include <QFileInfo>
-#include <QDesktopServices>
void PLModel::popupExplore()
{
PL_LOCK;
PL_UNLOCK;
}
-#include <QInputDialog>
void PLModel::popupAddNode()
{
bool ok;
QString name = QInputDialog::getText( PlaylistDialog::getInstance( p_intf ),
- qtr( "Create Folder" ), qtr( "Enter name for new folder:" ),
+ qtr( I_NEW_DIR ), qtr( I_NEW_DIR_NAME ),
QLineEdit::Normal, QString(), &ok);
if( !ok || name.isEmpty() ) return;
PL_LOCK;
#include "util/customwidgets.hpp"
#include "util/qt_dirs.hpp"
#include <vlc_keys.h>
+#include <vlc_intf_strings.h>
#include <QString>
#include <QVariant>
void DirectoryConfigControl::updateField()
{
QString dir = QFileDialog::getExistingDirectory( NULL,
- qtr( "Select Directory" ),
+ qtr( I_OP_SEL_DIR ),
text->text().isEmpty() ?
QVLCUserDir( VLC_HOME_DIR ) : text->text(),
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks );
#include "components/sout/sout_widgets.hpp"
#include "dialogs/sout.hpp"
#include "util/qt_dirs.hpp"
+#include <vlc_intf_strings.h>
#include <QGroupBox>
#include <QGridLayout>
#include <QLineEdit>
#include <QFileDialog>
+#define I_FILE_SLASH_DIR \
+ I_DIR_OR_FOLDER( N_("File/Directory"), N_("File/Folder") )
+
SoutInputBox::SoutInputBox( QWidget *_parent, const QString& mrl ) : QGroupBox( _parent )
{
/**
type = mrl.left( i );
}
else
- type = qtr( "File/Directory" );
+ type = qtr( I_FILE_SLASH_DIR );
sourceValueLabel->setText( type );
}
else
{
QString dest_dir = QFileDialog::getExistingDirectory( this,
- qtr( "Select a directory..." ),
+ qtr( I_OP_SEL_DIR ),
QVLCUserDir( VLC_DOWNLOAD_DIR ) );
if( !dest_dir.isEmpty() )
#include <QSignalMapper>
#include <QFileDialog>
+#define I_OP_DIR_WINTITLE I_DIR_OR_FOLDER( N_("Open Directory"), \
+ N_("Open Folder") )
DialogsProvider* DialogsProvider::instance = NULL;
**/
static void openDirectory( intf_thread_t *p_intf, bool pl, bool go )
{
- QString dir = QFileDialog::getExistingDirectory( NULL, qtr("Open Directory"), p_intf->p_sys->filepath );
+ QString dir = QFileDialog::getExistingDirectory( NULL, qtr( I_OP_DIR_WINTITLE ), p_intf->p_sys->filepath );
if (!dir.isEmpty() )
{
":/type/file-asym", SLOT( simpleOpenDialog() ), "Ctrl+O" );
addDPStaticEntry( menu, qtr( "Advanced Open File..." ),
":/type/file-asym", SLOT( openFileDialog() ), "Ctrl+Shift+O" );
- addDPStaticEntry( menu, qtr( I_OPEN_FOLDER ),
+ addDPStaticEntry( menu, qtr( I_OP_OPDIR ),
":/type/folder-grey", SLOT( PLOpenDir() ), "Ctrl+F" );
addDPStaticEntry( menu, qtr( "Open &Disc..." ),
":/type/disc", SLOT( openDiscDialog() ), "Ctrl+D" );
QMenu *openmenu = new QMenu( qtr( "Open Media" ), menu );
addDPStaticEntry( openmenu, qtr( "&Open File..." ),
":/type/file-asym", SLOT( openFileDialog() ) );
- addDPStaticEntry( openmenu, qtr( I_OPEN_FOLDER ),
+ addDPStaticEntry( openmenu, qtr( I_OP_OPDIR ),
":/type/folder-grey", SLOT( PLOpenDir() ) );
addDPStaticEntry( openmenu, qtr( "Open &Disc..." ),
":/type/disc", SLOT( openDiscDialog() ) );
#include <QAction>
#include <vector>
-/* Folder vs. Directory */
-#if defined( WIN32 ) || defined(__APPLE__)
-#define I_OPEN_FOLDER N_("Open &Folder...")
-#else
-#define I_OPEN_FOLDER N_("Open D&irectory...")
-#endif //WIN32
-
using namespace std;
class QMenu;