Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
8ac498d3
Commit
8ac498d3
authored
Jul 09, 2007
by
Robert Knight
Browse files
i18n fixes from Stefan Asserhall.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=685630
parent
5be4ac86
Changes
11
Hide whitespace changes
Inline
Side-by-side
src/ColorScheme.cpp
View file @
8ac498d3
...
...
@@ -84,28 +84,28 @@ const char* ColorScheme::colorNames[TABLE_COLORS] =
"Color6Intense"
,
"Color7Intense"
};
const
QString
ColorScheme
::
translatedColorNames
[
TABLE_COLORS
]
=
{
i
18
n
(
"Foreground"
),
i
18
n
(
"Background"
),
i
18
n
(
"Color 1"
),
i
18
n
(
"Color 2"
),
i
18
n
(
"Color 3"
),
i
18
n
(
"Color 4"
),
i
18
n
(
"Color 5"
),
i
18
n
(
"Color 6"
),
i
18
n
(
"Color 7"
),
i
18
n
(
"Color 8"
),
i
18
n
(
"Foreground (Intense)"
),
i
18
n
(
"Background (Intense)"
),
i
18
n
(
"Color 1 (Intense)"
),
i
18
n
(
"Color 2 (Intense)"
),
i
18
n
(
"Color 3 (Intense)"
),
i
18
n
(
"Color 4 (Intense)"
),
i
18
n
(
"Color 5 (Intense)"
),
i
18
n
(
"Color 6 (Intense)"
),
i
18
n
(
"Color 7 (Intense)"
),
i
18
n
(
"Color 8 (Intense)"
)
const
char
*
ColorScheme
::
translatedColorNames
[
TABLE_COLORS
]
=
{
I
18
N_NOOP
(
"Foreground"
),
I
18
N_NOOP
(
"Background"
),
I
18
N_NOOP
(
"Color 1"
),
I
18
N_NOOP
(
"Color 2"
),
I
18
N_NOOP
(
"Color 3"
),
I
18
N_NOOP
(
"Color 4"
),
I
18
N_NOOP
(
"Color 5"
),
I
18
N_NOOP
(
"Color 6"
),
I
18
N_NOOP
(
"Color 7"
),
I
18
N_NOOP
(
"Color 8"
),
I
18
N_NOOP
(
"Foreground (Intense)"
),
I
18
N_NOOP
(
"Background (Intense)"
),
I
18
N_NOOP
(
"Color 1 (Intense)"
),
I
18
N_NOOP
(
"Color 2 (Intense)"
),
I
18
N_NOOP
(
"Color 3 (Intense)"
),
I
18
N_NOOP
(
"Color 4 (Intense)"
),
I
18
N_NOOP
(
"Color 5 (Intense)"
),
I
18
N_NOOP
(
"Color 6 (Intense)"
),
I
18
N_NOOP
(
"Color 7 (Intense)"
),
I
18
N_NOOP
(
"Color 8 (Intense)"
)
};
ColorSchemeManager
*
ColorSchemeManager
::
_instance
=
0
;
...
...
@@ -239,8 +239,10 @@ qreal ColorScheme::opacity() const { return _opacity; }
void
ColorScheme
::
read
(
KConfig
&
config
)
{
KConfigGroup
configGroup
=
config
.
group
(
"General"
);
_description
=
configGroup
.
readEntry
(
"Description"
,
i18n
(
"Un-named Color Scheme"
));
QString
description
=
configGroup
.
readEntry
(
"Description"
,
I18N_NOOP
(
"Un-named Color Scheme"
));
_description
=
i18n
(
description
.
toUtf8
());
_opacity
=
configGroup
.
readEntry
(
"Opacity"
,
qreal
(
1.0
));
for
(
int
i
=
0
;
i
<
TABLE_COLORS
;
i
++
)
...
...
@@ -271,7 +273,7 @@ QString ColorScheme::translatedColorNameForIndex(int index)
{
Q_ASSERT
(
index
>=
0
&&
index
<
TABLE_COLORS
);
return
QString
(
translatedColorNames
[
index
]);
return
i18n
(
translatedColorNames
[
index
]);
}
void
ColorScheme
::
readColorEntry
(
KConfig
&
config
,
int
index
)
{
...
...
@@ -376,7 +378,9 @@ void KDE3ColorSchemeReader::readTitleLine(const QString& line,ColorScheme* schem
int
spacePos
=
line
.
indexOf
(
' '
);
Q_ASSERT
(
spacePos
!=
-
1
);
scheme
->
setDescription
(
line
.
mid
(
spacePos
+
1
));
QString
description
=
line
.
mid
(
spacePos
+
1
);
scheme
->
setDescription
(
i18n
(
description
.
toUtf8
()));
}
ColorSchemeManager
::
ColorSchemeManager
()
:
_haveLoadedAll
(
false
)
...
...
src/ColorScheme.h
View file @
8ac498d3
...
...
@@ -175,7 +175,7 @@ private:
// randomization
static
const
char
*
colorNames
[
TABLE_COLORS
];
static
const
QString
translatedColorNames
[
TABLE_COLORS
];
static
const
char
*
translatedColorNames
[
TABLE_COLORS
];
static
const
ColorEntry
defaultTable
[];
// table of default color entries
};
...
...
src/Emulation.h
View file @
8ac498d3
...
...
@@ -206,6 +206,15 @@ public:
/** Resets the state of the terminal. */
virtual
void
reset
()
=
0
;
/**
* Returns true if the active terminal program wants
* mouse input events.
*
* The programUsesMouseChanged() signal is emitted when this
* changes.
*/
bool
programUsesMouse
()
const
;
public
slots
:
/** Change the size of the emulation's image */
...
...
@@ -300,7 +309,7 @@ signals:
* @param usesMouse This will be true if the program wants to be informed about
* mouse events or false otherwise.
*/
void
programUsesMouse
(
bool
usesMouse
);
void
programUsesMouse
Changed
(
bool
usesMouse
);
/**
* Emitted when the contents of the screen image change.
...
...
src/IncrementalSearchBar.cpp
View file @
8ac498d3
...
...
@@ -49,7 +49,7 @@ IncrementalSearchBar::IncrementalSearchBar(Features features , QWidget* parent)
QToolButton
*
close
=
new
QToolButton
(
this
);
close
->
setObjectName
(
"close-button"
);
close
->
setToolTip
(
"Close the search bar"
);
close
->
setToolTip
(
i18n
(
"Close the search bar"
)
)
;
close
->
setAutoRaise
(
true
);
close
->
setIcon
(
KIcon
(
"dialog-cancel"
));
connect
(
close
,
SIGNAL
(
clicked
())
,
this
,
SIGNAL
(
closeClicked
())
);
...
...
@@ -58,7 +58,7 @@ IncrementalSearchBar::IncrementalSearchBar(Features features , QWidget* parent)
_searchEdit
=
new
QLineEdit
(
this
);
_searchEdit
->
installEventFilter
(
this
);
_searchEdit
->
setObjectName
(
"search-edit"
);
_searchEdit
->
setToolTip
(
"Enter the text to search for here"
);
_searchEdit
->
setToolTip
(
i18n
(
"Enter the text to search for here"
)
)
;
// text box may be a minimum of 6 characters wide and a maximum of 10 characters wide
// (since the maxWidth metric is used here, more characters probably will fit in than 6
...
...
@@ -80,7 +80,7 @@ IncrementalSearchBar::IncrementalSearchBar(Features features , QWidget* parent)
findNext
->
setAutoRaise
(
true
);
findNext
->
setIcon
(
KIcon
(
"find-next"
)
);
findNext
->
setToolButtonStyle
(
Qt
::
ToolButtonTextBesideIcon
);
findNext
->
setToolTip
(
"Find the next match for the current search phrase"
);
findNext
->
setToolTip
(
i18n
(
"Find the next match for the current search phrase"
)
)
;
connect
(
findNext
,
SIGNAL
(
clicked
())
,
this
,
SIGNAL
(
findNextClicked
())
);
QToolButton
*
findPrev
=
new
QToolButton
(
this
);
...
...
@@ -89,14 +89,14 @@ IncrementalSearchBar::IncrementalSearchBar(Features features , QWidget* parent)
findPrev
->
setAutoRaise
(
true
);
findPrev
->
setIcon
(
KIcon
(
"find-previous"
)
);
findPrev
->
setToolButtonStyle
(
Qt
::
ToolButtonTextBesideIcon
);
findPrev
->
setToolTip
(
"Find the previous match for the current search phrase"
);
findPrev
->
setToolTip
(
i18n
(
"Find the previous match for the current search phrase"
)
)
;
connect
(
findPrev
,
SIGNAL
(
clicked
())
,
this
,
SIGNAL
(
findPreviousClicked
())
);
if
(
features
&
HighlightMatches
)
{
_highlightBox
=
new
QCheckBox
(
i18n
(
"Highlight all"
)
,
this
);
_highlightBox
->
setObjectName
(
"highlight-matches-box"
);
_highlightBox
->
setToolTip
(
"Sets whether matching text should be highlighted"
);
_highlightBox
->
setToolTip
(
i18n
(
"Sets whether matching text should be highlighted"
)
)
;
_highlightBox
->
setChecked
(
true
);
connect
(
_highlightBox
,
SIGNAL
(
toggled
(
bool
))
,
this
,
SIGNAL
(
highlightMatchesToggled
(
bool
))
);
...
...
@@ -106,7 +106,7 @@ IncrementalSearchBar::IncrementalSearchBar(Features features , QWidget* parent)
{
_matchCaseBox
=
new
QCheckBox
(
i18n
(
"Match case"
)
,
this
);
_matchCaseBox
->
setObjectName
(
"match-case-box"
);
_matchCaseBox
->
setToolTip
(
"Sets whether the searching is case sensitive"
);
_matchCaseBox
->
setToolTip
(
i18n
(
"Sets whether the searching is case sensitive"
)
)
;
connect
(
_matchCaseBox
,
SIGNAL
(
toggled
(
bool
))
,
this
,
SIGNAL
(
matchCaseToggled
(
bool
))
);
}
...
...
@@ -114,8 +114,8 @@ IncrementalSearchBar::IncrementalSearchBar(Features features , QWidget* parent)
{
_matchRegExpBox
=
new
QCheckBox
(
i18n
(
"Match regular expression"
)
,
this
);
_matchRegExpBox
->
setObjectName
(
"match-regexp-box"
);
_matchRegExpBox
->
setToolTip
(
"Sets whether the search phrase is interpreted as normal text or"
" as a regular expression"
);
_matchRegExpBox
->
setToolTip
(
i18n
(
"Sets whether the search phrase is interpreted as normal text or"
" as a regular expression"
)
)
;
connect
(
_matchRegExpBox
,
SIGNAL
(
toggled
(
bool
))
,
this
,
SIGNAL
(
matchRegExpToggled
(
bool
))
);
}
...
...
src/KeyboardTranslator.cpp
View file @
8ac498d3
...
...
@@ -35,6 +35,7 @@
#include
<QtGui/QKeySequence>
// KDE
#include
<KLocale>
#include
<KStandardDirs>
using
namespace
Konsole
;
...
...
@@ -213,7 +214,7 @@ KeyboardTranslatorReader::KeyboardTranslatorReader( QIODevice* source )
if
(
!
tokens
.
isEmpty
()
&&
tokens
.
first
().
type
==
Token
::
TitleKeyword
)
{
_description
=
tokens
[
1
].
text
;
_description
=
i18n
(
tokens
[
1
].
text
.
toUtf8
())
;
}
}
...
...
src/MainWindow.cpp
View file @
8ac498d3
...
...
@@ -183,7 +183,7 @@ void MainWindow::setupActions()
_toggleMenuBarAction
=
new
KToggleAction
(
this
);
_toggleMenuBarAction
->
setText
(
i18n
(
"Show Menu Bar"
)
);
_toggleMenuBarAction
->
setIcon
(
KIcon
(
"show-menu"
)
);
_toggleMenuBarAction
->
setCheckedState
(
KGuiItem
(
"Hide Menu Bar"
,
"show-menu"
)
);
_toggleMenuBarAction
->
setCheckedState
(
KGuiItem
(
i18n
(
"Hide Menu Bar"
)
,
"show-menu"
)
);
_toggleMenuBarAction
->
setChecked
(
!
menuBar
()
->
isHidden
()
);
connect
(
_toggleMenuBarAction
,
SIGNAL
(
toggled
(
bool
))
,
menuBar
()
,
SLOT
(
setVisible
(
bool
))
);
collection
->
addAction
(
"show-menubar"
,
_toggleMenuBarAction
);
...
...
src/Messages.sh
View file @
8ac498d3
...
...
@@ -4,9 +4,14 @@ rm -f schemas.cpp
for
i
in
../data/color-schemes/
*
.schema
;
do
grep
"^title"
$i
|
cut
-d
':'
-f2-
|
sed
-e
's#^title \(.*\)$#i18n(\"\1\")#'
>>
schemas.cpp
done
for
i
in
../data/color-schemes/
*
.colorscheme
;
do
grep
"^Description="
$i
|
sed
-e
's#^Description=\(.*\)$#i18n(\"\1\")#'
>>
schemas.cpp
done
for
i
in
../data/keyboard-layouts/
*
.keytab
;
do
grep
"^keyboard"
$i
|
sed
-e
's#^keyboard \"\(.*\)\"$#i18n(\"\1\")#'
>>
schemas.cpp
done
$EXTRACTRC
`
find
.
-name
\*
.ui
`
>
rc.cpp
$EXTRACTRC
`
find ../desktop
-name
\*
.rc
`
>>
rc.cpp
$XGETTEXT
*
.cpp
-o
$podir
/konsole.pot
rm
-f
schemas.cpp
rm
-f
tips.cpp
src/Session.cpp
View file @
8ac498d3
...
...
@@ -194,7 +194,7 @@ void Session::addView(TerminalDisplay* widget)
// allow emulation to notify view when the foreground process
// indicates whether or not it is interested in mouse signals
connect
(
_emulation
,
SIGNAL
(
programUsesMouse
(
bool
))
,
widget
,
connect
(
_emulation
,
SIGNAL
(
programUsesMouse
Changed
(
bool
))
,
widget
,
SLOT
(
setUsesMouse
(
bool
))
);
widget
->
setScreenWindow
(
_emulation
->
createWindow
());
...
...
src/TabTitleFormatAction.cpp
View file @
8ac498d3
...
...
@@ -31,18 +31,18 @@ using namespace Konsole;
const
TabTitleFormatAction
::
Element
TabTitleFormatAction
::
_localElements
[]
=
{
{
"%n"
,
i
18
n
(
"Program name"
)
},
{
"%d"
,
i
18
n
(
"Current directory (Short)"
)
},
{
"%D"
,
i
18
n
(
"Current directory (Long)"
)
},
{
"%w"
,
i
18
n
(
"Window title set by shell"
)
}
{
"%n"
,
I
18
N_NOOP
(
"Program name"
)
},
{
"%d"
,
I
18
N_NOOP
(
"Current directory (Short)"
)
},
{
"%D"
,
I
18
N_NOOP
(
"Current directory (Long)"
)
},
{
"%w"
,
I
18
N_NOOP
(
"Window title set by shell"
)
}
};
const
int
TabTitleFormatAction
::
_localElementCount
=
4
;
const
TabTitleFormatAction
::
Element
TabTitleFormatAction
::
_remoteElements
[]
=
{
{
"%u"
,
i
18
n
(
"User name"
)
},
{
"%h"
,
i
18
n
(
"Remote host (Short)"
)
},
{
"%H"
,
i
18
n
(
"Remote host (Long)"
)
},
{
"%w"
,
i
18
n
(
"Window title set by shell"
)
}
{
"%u"
,
I
18
N_NOOP
(
"User name"
)
},
{
"%h"
,
I
18
N_NOOP
(
"Remote host (Short)"
)
},
{
"%H"
,
I
18
N_NOOP
(
"Remote host (Long)"
)
},
{
"%w"
,
I
18
N_NOOP
(
"Window title set by shell"
)
}
};
const
int
TabTitleFormatAction
::
_remoteElementCount
=
4
;
...
...
@@ -85,7 +85,7 @@ void TabTitleFormatAction::setContext(Session::TabTitleContext context)
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
QAction
*
action
=
new
QAction
(
array
[
i
].
description
,
this
);
QAction
*
action
=
new
QAction
(
i18n
(
array
[
i
].
description
)
,
this
);
action
->
setData
(
array
[
i
].
element
);
list
<<
action
;
}
...
...
src/TabTitleFormatAction.h
View file @
8ac498d3
...
...
@@ -52,7 +52,7 @@ private:
struct
Element
{
QString
element
;
QString
description
;
char
*
description
;
};
static
const
Element
_localElements
[];
static
const
int
_localElementCount
;
...
...
src/Vt102Emulation.cpp
View file @
8ac498d3
...
...
@@ -1231,7 +1231,7 @@ void Vt102Emulation::setMode(int m)
case
MODE_Mouse1001
:
case
MODE_Mouse1002
:
case
MODE_Mouse1003
:
emit
programUsesMouse
(
false
);
emit
programUsesMouse
Changed
(
false
);
break
;
case
MODE_AppScreen
:
_screen
[
1
]
->
clearSelection
();
...
...
@@ -1254,7 +1254,7 @@ void Vt102Emulation::resetMode(int m)
case
MODE_Mouse1001
:
case
MODE_Mouse1002
:
case
MODE_Mouse1003
:
emit
programUsesMouse
(
true
);
emit
programUsesMouse
Changed
(
true
);
break
;
case
MODE_AppScreen
:
_screen
[
0
]
->
clearSelection
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment