TranslatableString for AudacityTextEntryDialog message and caption
This commit is contained in:
parent
e56fb4ebcf
commit
89a3771730
|
@ -965,8 +965,8 @@ void MacrosWindow::OnAdd(wxCommandEvent & WXUNUSED(event))
|
|||
{
|
||||
while (true) {
|
||||
AudacityTextEntryDialog d(this,
|
||||
_("Enter name of new macro"),
|
||||
_("Name of new macro"));
|
||||
XO("Enter name of new macro"),
|
||||
XO("Name of new macro"));
|
||||
d.SetName(d.GetTitle());
|
||||
wxString name;
|
||||
|
||||
|
|
|
@ -59,11 +59,11 @@ void Generate(wxDebugReport::Context ctx)
|
|||
|
||||
if (ok && rpt.Process())
|
||||
{
|
||||
AudacityTextEntryDialog dlg(NULL,
|
||||
_("Report generated to:"),
|
||||
_("Audacity Support Data"),
|
||||
rpt.GetCompressedFileName(),
|
||||
wxOK | wxCENTER);
|
||||
AudacityTextEntryDialog dlg(nullptr,
|
||||
XO("Report generated to:"),
|
||||
XO("Audacity Support Data"),
|
||||
rpt.GetCompressedFileName(),
|
||||
wxOK | wxCENTER);
|
||||
dlg.SetName(dlg.GetTitle());
|
||||
dlg.ShowModal();
|
||||
|
||||
|
|
|
@ -812,10 +812,10 @@ void LabelDialog::OnChangeTrack(wxGridEvent & WXUNUSED(event), int row, RowData
|
|||
// User selected the "New..." choice so ask for a NEW name
|
||||
if ( make_iterator_range( mTrackNames ).index( val ) == 0 ) {
|
||||
AudacityTextEntryDialog d(this,
|
||||
_("New Label Track"),
|
||||
_("Enter track name"),
|
||||
/* i18n-hint: (noun) it's the name of a kind of track.*/
|
||||
_("Label Track"));
|
||||
XO("New Label Track"),
|
||||
XO("Enter track name"),
|
||||
/* i18n-hint: (noun) it's the name of a kind of track.*/
|
||||
XO("Label Track").Translation());
|
||||
|
||||
// User canceled so repopulating the grid will set the track
|
||||
// name to the orignal value
|
||||
|
|
|
@ -3516,8 +3516,8 @@ void EditCurvesDialog::OnRename(wxCommandEvent & WXUNUSED(event))
|
|||
bad = false;
|
||||
// build the dialog
|
||||
AudacityTextEntryDialog dlg( this,
|
||||
wxString::Format( _("Rename '%s' to..."), mEditCurves[ item ].Name ),
|
||||
_("Rename...") );
|
||||
XO("Rename '%s' to...").Format( mEditCurves[ item ].Name ),
|
||||
XO("Rename...") );
|
||||
dlg.SetTextValidator( wxFILTER_EXCLUDE_CHAR_LIST );
|
||||
dlg.SetName(
|
||||
wxString::Format( _("Rename '%s'"), mEditCurves[ item ].Name ) );
|
||||
|
|
|
@ -1111,20 +1111,22 @@ wxString ExportMultipleDialog::MakeFileName(const wxString &input)
|
|||
if(changed)
|
||||
{ // need to get user to fix file name
|
||||
// build the dialog
|
||||
wxString msg;
|
||||
TranslatableString msg;
|
||||
wxString excluded = ::wxJoin( Internat::GetExcludedCharacters(), wxChar(' ') );
|
||||
// TODO: For Russian langauge we should have separate cases for 2 and more than 2 letters.
|
||||
if( excluded.length() > 1 ){
|
||||
// i18n-hint: The second %s gives some letters that can't be used.
|
||||
msg.Printf(_("Label or track \"%s\" is not a legal file name. You cannot use any of: %s\nUse..."), input,
|
||||
excluded);
|
||||
msg = XO(
|
||||
"Label or track \"%s\" is not a legal file name. You cannot use any of: %s\nUse...")
|
||||
.Format( input, excluded );
|
||||
} else {
|
||||
// i18n-hint: The second %s gives a letter that can't be used.
|
||||
msg.Printf(_("Label or track \"%s\" is not a legal file name. You cannot use \"%s\".\nUse..."), input,
|
||||
excluded);
|
||||
msg = XO(
|
||||
"Label or track \"%s\" is not a legal file name. You cannot use \"%s\".\nUse...")
|
||||
.Format( input, excluded );
|
||||
}
|
||||
|
||||
AudacityTextEntryDialog dlg( this, msg, _("Save As..."), newname );
|
||||
AudacityTextEntryDialog dlg( this, msg, XO("Save As..."), newname );
|
||||
|
||||
|
||||
// And tell the validator about excluded chars
|
||||
|
|
|
@ -2085,8 +2085,8 @@ int LabelTrackView::DialogForLabelName(
|
|||
position = trackPanel.ClientToScreen(position);
|
||||
auto &window = GetProjectFrame( project );
|
||||
AudacityTextEntryDialog dialog{ &window,
|
||||
_("Name:"),
|
||||
_("New label"),
|
||||
XO("Name:"),
|
||||
XO("New label"),
|
||||
initialValue,
|
||||
wxOK | wxCANCEL,
|
||||
position };
|
||||
|
|
|
@ -69,13 +69,14 @@ class AudacityTextEntryDialog : public wxTabTraversalWrapper< wxTextEntryDialog
|
|||
public:
|
||||
AudacityTextEntryDialog(
|
||||
wxWindow *parent,
|
||||
const wxString& message,
|
||||
const wxString& caption, // don't use = wxGetTextFromUserPromptStr,
|
||||
const TranslatableString& message,
|
||||
const TranslatableString& caption, // don't use = wxGetTextFromUserPromptStr,
|
||||
const wxString& value = {},
|
||||
long style = wxTextEntryDialogStyle,
|
||||
const wxPoint& pos = wxDefaultPosition)
|
||||
: wxTabTraversalWrapper< wxTextEntryDialog>
|
||||
( parent, message, caption, value, style, pos )
|
||||
: wxTabTraversalWrapper< wxTextEntryDialog>(
|
||||
parent,
|
||||
message.Translation(), caption.Translation(), value, style, pos )
|
||||
{}
|
||||
|
||||
void SetInsertionPointEnd();
|
||||
|
|
Loading…
Reference in New Issue