Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
137d1329
Commit
137d1329
authored
Mar 26, 2011
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make some messages translatable.
parent
9a27065f
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
53 additions
and
31 deletions
+53
-31
lib_pin.cpp
eeschema/lib_pin.cpp
+7
-4
sch_component.cpp
eeschema/sch_component.cpp
+5
-3
sch_field.cpp
eeschema/sch_field.cpp
+3
-2
sch_line.cpp
eeschema/sch_line.cpp
+14
-10
sch_polyline.cpp
eeschema/sch_polyline.cpp
+6
-6
sch_sheet.cpp
eeschema/sch_sheet.cpp
+3
-1
sch_sheet_pin.cpp
eeschema/sch_sheet_pin.cpp
+3
-1
sch_text.cpp
eeschema/sch_text.cpp
+12
-4
No files found.
eeschema/lib_pin.cpp
View file @
137d1329
...
...
@@ -1884,10 +1884,13 @@ const char** LIB_PIN::GetMenuImage() const
wxString
LIB_PIN
::
GetSelectMenuText
()
const
{
wxString
tmp
=
_
(
"Pin "
);
return
tmp
<<
GetNumberString
()
<<
wxT
(
", "
)
<<
GetTypeString
()
<<
wxT
(
", "
)
<<
wxGetTranslation
(
pin_style_names
[
GetStyleCodeIndex
(
m_shape
)
]
);;
wxString
tmp
;
tmp
.
Printf
(
_
(
"Pin %s, %s, %s"
),
GetChars
(
GetNumberString
()
),
GetChars
(
GetTypeString
()
),
GetChars
(
wxGetTranslation
(
pin_style_names
[
GetStyleCodeIndex
(
m_shape
)
]
)
)
);
return
tmp
;
}
...
...
eeschema/sch_component.cpp
View file @
137d1329
...
...
@@ -1633,9 +1633,11 @@ LIB_DRAW_ITEM* SCH_COMPONENT::GetDrawItem( const wxPoint& aPosition, KICAD_T aTy
wxString
SCH_COMPONENT
::
GetSelectMenuText
()
const
{
wxString
tmp
=
_
(
"Component "
);
return
tmp
<<
m_ChipName
<<
wxT
(
", "
)
<<
GetField
(
REFERENCE
)
->
GetText
();
wxString
tmp
;
tmp
.
Printf
(
_
(
"Component %s, %s"
),
GetChars
(
m_ChipName
),
GetChars
(
GetField
(
REFERENCE
)
->
GetText
()
)
);
return
tmp
;
}
...
...
eeschema/sch_field.cpp
View file @
137d1329
...
...
@@ -449,9 +449,10 @@ void SCH_FIELD::Rotate( wxPoint rotationPoint )
wxString
SCH_FIELD
::
GetSelectMenuText
()
const
{
wxString
tmp
=
_
(
"Field "
);
wxString
tmp
;
tmp
.
Printf
(
_
(
"Field %s"
),
GetChars
(
+
GetName
()
)
);
return
tmp
+
GetName
()
;
return
tmp
;
}
...
...
eeschema/sch_line.cpp
View file @
137d1329
...
...
@@ -419,31 +419,35 @@ void SCH_LINE::GetConnectionPoints( vector< wxPoint >& aPoints ) const
wxString
SCH_LINE
::
GetSelectMenuText
()
const
{
wxString
menuText
;
wxString
menuText
,
txtfmt
,
orient
;
if
(
m_Start
.
x
==
m_End
.
x
)
orient
=
_
(
"Vert."
);
else
if
(
m_Start
.
y
==
m_End
.
y
)
orient
=
_
(
"Horiz."
);
switch
(
m_Layer
)
{
case
LAYER_NOTES
:
menuText
=
_
(
"Graphic Line
"
);
txtfmt
=
_
(
"%s Graphic Line from (%s,%s) to (%s,%s)
"
);
break
;
case
LAYER_WIRE
:
menuText
=
_
(
"Wire
"
);
txtfmt
=
_
(
"%s Wire from (%s,%s) to (%s,%s)
"
);
break
;
case
LAYER_BUS
:
menuText
=
_
(
"Bus
"
);
txtfmt
=
_
(
"%s Bus from (%s,%s) to (%s,%s)
"
);
break
;
default
:
menuText
=
_
(
"Line on Unkown Layer
"
);
txtfmt
+=
_
(
"%s Line on Unkown Layer from (%s,%s) to (%s,%s)
"
);
}
menuText
<<
wxT
(
"from ("
)
<<
CoordinateToString
(
m_Start
.
x
,
EESCHEMA_INTERNAL_UNIT
)
<<
wxT
(
","
)
<<
CoordinateToString
(
m_Start
.
y
,
EESCHEMA_INTERNAL_UNIT
)
<<
wxT
(
")"
);
menuText
<<
wxT
(
" to ("
)
<<
CoordinateToString
(
m_End
.
x
,
EESCHEMA_INTERNAL_UNIT
)
<<
wxT
(
","
)
<<
CoordinateToString
(
m_End
.
y
,
EESCHEMA_INTERNAL_UNIT
)
<<
wxT
(
")"
);
menuText
.
Printf
(
txtfmt
,
GetChars
(
orient
),
GetChars
(
CoordinateToString
(
m_Start
.
x
,
EESCHEMA_INTERNAL_UNIT
)),
GetChars
(
CoordinateToString
(
m_Start
.
y
,
EESCHEMA_INTERNAL_UNIT
)),
GetChars
(
CoordinateToString
(
m_End
.
x
,
EESCHEMA_INTERNAL_UNIT
)),
GetChars
(
CoordinateToString
(
m_End
.
y
,
EESCHEMA_INTERNAL_UNIT
))
);
return
menuText
;
}
...
...
eeschema/sch_polyline.cpp
View file @
137d1329
...
...
@@ -207,27 +207,27 @@ void SCH_POLYLINE::Rotate( wxPoint rotationPoint )
wxString
SCH_POLYLINE
::
GetSelectMenuText
()
const
{
wxString
menuText
;
wxString
menuText
,
fmt
;
switch
(
m_Layer
)
{
case
LAYER_NOTES
:
menuText
=
_
(
"Graphic Polyline
"
);
fmt
=
_
(
"Graphic Polyline with %d Points
"
);
break
;
case
LAYER_WIRE
:
menuText
=
_
(
"Polyline Wire
"
);
fmt
=
_
(
"Polyline Wire with %d Points
"
);
break
;
case
LAYER_BUS
:
menuText
=
_
(
"Polyline Bus
"
);
fmt
=
_
(
"Polyline Bus with %d Points
"
);
break
;
default
:
menuText
=
_
(
"Polyline on Unkown Layer
"
);
fmt
=
_
(
"Polyline on Unkown Layer with %d Points
"
);
}
menuText
+=
wxString
::
Format
(
_
(
"with %d Points"
)
,
m_PolyPoints
.
size
()
);
menuText
.
Printf
(
fmt
,
m_PolyPoints
.
size
()
);
return
menuText
;
}
...
...
eeschema/sch_sheet.cpp
View file @
137d1329
...
...
@@ -983,7 +983,9 @@ SEARCH_RESULT SCH_SHEET::Visit( INSPECTOR* aInspector, const void* aTestData,
wxString
SCH_SHEET
::
GetSelectMenuText
()
const
{
return
wxString
(
_
(
"Hierarchical Sheet "
)
)
+
m_SheetName
;
wxString
tmp
;
tmp
.
Printf
(
_
(
"Hierarchical Sheet "
),
GetChars
(
m_SheetName
)
);
return
tmp
;
}
...
...
eeschema/sch_sheet_pin.cpp
View file @
137d1329
...
...
@@ -461,7 +461,9 @@ void SCH_SHEET_PIN::GetEndPoints( std::vector <DANGLING_END_ITEM>& aItemList )
wxString
SCH_SHEET_PIN
::
GetSelectMenuText
()
const
{
return
wxString
(
_
(
"Hierarchical Sheet Label "
)
)
+
GetText
();
wxString
tmp
;
tmp
.
Printf
(
_
(
"Hierarchical Sheet Label %s"
),
GetChars
(
GetText
()
)
);
return
tmp
;
}
...
...
eeschema/sch_text.cpp
View file @
137d1329
...
...
@@ -628,7 +628,9 @@ wxString SCH_TEXT::GetSelectMenuText() const
tmp
.
Replace
(
wxT
(
"
\t
"
),
wxT
(
" "
)
);
tmp
=
(
tmp
.
Length
()
>
15
)
?
tmp
.
Left
(
12
)
+
wxT
(
"..."
)
:
tmp
;
return
wxString
(
_
(
"Graphic Text "
)
)
+
tmp
;
wxString
msg
;
msg
.
Printf
(
_
(
"Graphic Text %s"
),
GetChars
(
tmp
));
return
msg
;
}
...
...
@@ -859,7 +861,9 @@ wxString SCH_LABEL::GetSelectMenuText() const
{
wxString
tmp
=
(
GetText
().
Length
()
>
15
)
?
GetText
().
Left
(
12
)
+
wxT
(
"..."
)
:
GetText
();
return
wxString
(
_
(
"Label "
)
)
+
tmp
;
wxString
msg
;
msg
.
Printf
(
_
(
"Label %s"
),
GetChars
(
tmp
)
);
return
msg
;
}
...
...
@@ -1290,7 +1294,9 @@ wxString SCH_GLOBALLABEL::GetSelectMenuText() const
{
wxString
tmp
=
(
GetText
().
Length
()
>
15
)
?
GetText
().
Left
(
12
)
+
wxT
(
"..."
)
:
GetText
();
return
wxString
(
_
(
"Global Label "
)
)
+
tmp
;
wxString
msg
;
msg
.
Printf
(
_
(
"Global Label %s"
),
GetChars
(
tmp
)
);
return
msg
;
}
...
...
@@ -1645,7 +1651,9 @@ wxString SCH_HIERLABEL::GetSelectMenuText() const
{
wxString
tmp
=
(
GetText
().
Length
()
>
15
)
?
GetText
().
Left
(
12
)
+
wxT
(
"..."
)
:
GetText
();
return
wxString
(
_
(
"Hierarchical Label "
)
)
+
tmp
;
wxString
msg
;
msg
.
Printf
(
_
(
"Hierarchical Label %s"
),
GetChars
(
tmp
)
);
return
msg
;
}
...
...
Write
Preview
Markdown
is supported
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