Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Various typo and translation of source comments + whitespace tweaks

luz paz266edb5e0c28
diff --git a/toonz/sources/common/tgeometry/tcurveutil.cpp b/toonz/sources/common/tgeometry/tcurveutil.cpp
index 42c7bbc4b..494929aeb 100644
--- a/toonz/sources/common/tgeometry/tcurveutil.cpp
+++ b/toonz/sources/common/tgeometry/tcurveutil.cpp
@@ -472,7 +472,7 @@ double tdistance(const TSegment &segment, const TPointD &point) {
//-----------------------------------------------------------------------------
/*
-This formule is derived from Graphic Gems pag. 600
+This formula is derived from Graphic Gems pag. 600
e = h^2 |a|/8
diff --git a/toonz/sources/common/tvectorimage/outlineApproximation.cpp b/toonz/sources/common/tvectorimage/outlineApproximation.cpp
index 9ab70b01d..ce0727e85 100644
--- a/toonz/sources/common/tvectorimage/outlineApproximation.cpp
+++ b/toonz/sources/common/tvectorimage/outlineApproximation.cpp
@@ -35,7 +35,7 @@ class notValidOutline {};
namespace {
/*
- This formule is derived from Graphic Gems pag. 600
+ This formula is derived from Graphic Gems pag. 600
e = h^2 |a|/8
diff --git a/toonz/sources/common/tvrender/tfont_qt.cpp b/toonz/sources/common/tvrender/tfont_qt.cpp
index 58b34509d..4ce4e0145 100644
--- a/toonz/sources/common/tvrender/tfont_qt.cpp
+++ b/toonz/sources/common/tvrender/tfont_qt.cpp
@@ -171,8 +171,8 @@ TPoint TFont::drawChar(QImage &outImage, TPoint &unused, wchar_t charcode,
// alphaMapForGlyph with a space character returns an invalid
// QImage for some reason.
// Bug 3604: https://github.com/opentoonz/opentoonz/issues/3604
- // (21/1/2022) Use this workaround for all platforms as the crash also occured
- // in windows when the display is scaled up.
+ // (21/1/2022) Use this workaround for all platforms as the crash also
+ // occurred in windows when the display is scaled up.
if (chars[0].isSpace()) {
int w = QFontMetrics(m_pimpl->m_font).horizontalAdvance(chars[0]);
outImage =
diff --git a/toonz/sources/include/tregion.h b/toonz/sources/include/tregion.h
index f2ae4c9e8..24cb53484 100644
--- a/toonz/sources/include/tregion.h
+++ b/toonz/sources/include/tregion.h
@@ -244,7 +244,7 @@ public:
};
//-----------------------------------------------------------------------------
-/*Spostata in tregion.cpp
+/* Moved to tregion.cpp
inline int TRegion::getStyle() const
{
int ret = 0;
@@ -271,10 +271,10 @@ public:
virtual void update(const TPointD &p1, const TPointD &p2) = 0;
};
-// permette di calcolare varie grandesse sul poligono della regione,
-// come l'area, il baricentro, il perimetro...
-// per usarla si deve sottoclassare la classe virtuale TRegionFeatureFormula
-// specificando la formual della grandezza da calcolare.
+// allows to calculate various magnitudes on the polygon of the region,
+// such as area, center of gravity, perimeter etc...
+// to use it, subclass the virtual class TRegionFeatureFormula
+// specifying the formula of the quantity to calculate.
void DVAPI computeRegionFeature(const TRegion &r,
TRegionFeatureFormula &formula);
diff --git a/toonz/sources/include/tsound_t.h b/toonz/sources/include/tsound_t.h
index 42b99bd8f..8adedf079 100644
--- a/toonz/sources/include/tsound_t.h
+++ b/toonz/sources/include/tsound_t.h
@@ -135,7 +135,7 @@ from which it's created. It has no reference to the object.
//----------------------------------------------------------------------------
- //! Applies a transformation (echo, reverb, ect) to the object and returns the
+ //! Applies a transformation (echo, reverb, etc) to the object and returns the
//! transformed soundtrack
TSoundTrackP apply(TSoundTransform *transform) override;
//----------------------------------------------------------------------------
diff --git a/toonz/sources/include/tspectrum.h b/toonz/sources/include/tspectrum.h
index 6e350fa38..f48174a0a 100644
--- a/toonz/sources/include/tspectrum.h
+++ b/toonz/sources/include/tspectrum.h
@@ -41,7 +41,7 @@ private:
ColorKey(s, T()),
[](const ColorKey &a, const ColorKey &b) {
return a.first < b.first;
- }); // compare only key postions
+ }); // compare only key positions
if (b == m_sortedKeys.end())
return m_sortedKeys.rbegin()->second;
diff --git a/toonz/sources/tnztools/toolutils.cpp b/toonz/sources/tnztools/toolutils.cpp
index 674ee004f..9fe30745f 100644
--- a/toonz/sources/tnztools/toolutils.cpp
+++ b/toonz/sources/tnztools/toolutils.cpp
@@ -1485,7 +1485,7 @@ double ToolUtils::ConeSubVolume::compute(double cover) {
if (i == 20)
return m_values[i];
else
- // Interpolazione lineare.
+ // Linear interpolation.
return (-(x - (i + 1)) * m_values[i]) - (-(x - i) * m_values[i + 1]);
}
@@ -1607,14 +1607,14 @@ void ToolUtils::drawBalloon(const TPointD &pos, std::string text,
pp.moveTo(x0, y - 8 * devPixRatio);
pp.lineTo(0, y + delta.y);
pp.lineTo(x0, y);
- /* bordi arrotondati
+ /* rounded borders
int arcSize = 10;
pp.arcTo(x0,y1-arcSize,arcSize,arcSize,180,90);
pp.arcTo(x1-arcSize,y1-arcSize,arcSize,arcSize,270,90);
pp.arcTo(x1-arcSize,y0,arcSize,arcSize,0,90);
pp.arcTo(x0,y0,arcSize,arcSize,90,90);
*/
- // bordi acuti
+ // sharp edges
pp.lineTo(x0, y1);
pp.lineTo(x1, y1);
pp.lineTo(x1, y0);
diff --git a/toonz/sources/toonz/castviewer.cpp b/toonz/sources/toonz/castviewer.cpp
index ec71d72a5..68831caf3 100644
--- a/toonz/sources/toonz/castviewer.cpp
+++ b/toonz/sources/toonz/castviewer.cpp
@@ -167,7 +167,7 @@ void CastTreeViewer::enableCommands() {
void CastTreeViewer::onFolderChanged(QTreeWidgetItem *current,
QTreeWidgetItem *previous) {
- // rende la selezione corrente; serve per intercettare il comando MI_Clear
+ // makes the selection current; serves to intercept the MI_Clear command
makeCurrent();
}
@@ -728,7 +728,7 @@ QMenu *CastBrowser::getContextMenu(QWidget *parent, int index) {
for (it = indices.begin(); it != indices.end(); ++it) {
int index = *it;
if (index < 0 || index >= m_castItems->getItemCount())
- continue; // non dovrebbe mai succedere
+ continue; // should never happen
TXshSimpleLevel *sl = m_castItems->getItem(index)->getSimpleLevel();
if (!sl) {
if (m_castItems->getItem(index)->getPaletteLevel())
@@ -762,7 +762,7 @@ QMenu *CastBrowser::getContextMenu(QWidget *parent, int index) {
menu->addAction(cm->getAction(MI_EditLevel));
if (!paletteSelected) menu->addAction(cm->getAction(MI_SaveLevel));
menu->addSeparator();
- // MI_ConvertToVectors se sono stati selezionati solo livelli non vettoriali
+ // MI_ConvertToVectors if only non-vector layers were selected
if (!audioSelected && !paletteSelected && !vectorLevelSelected)
menu->addAction(cm->getAction(MI_ConvertToVectors));
menu->addSeparator();
diff --git a/toonz/sources/toonz/sceneviewer.cpp b/toonz/sources/toonz/sceneviewer.cpp
index 40fd9d651..5a926a563 100644
--- a/toonz/sources/toonz/sceneviewer.cpp
+++ b/toonz/sources/toonz/sceneviewer.cpp
@@ -1025,7 +1025,7 @@ void SceneViewer::showEvent(QShowEvent *) {
m_visualSettings.m_sceneProperties =
TApp::instance()->getCurrentScene()->getScene()->getProperties();
- // Se il viewer e' show e il preview e' attivo aggiungo il listner al preview
+ // If the viewer is hidden and preview is activated, remove the listener from preview
if (m_previewMode != NO_PREVIEW)
Previewer::instance(m_previewMode == SUBCAMERA_PREVIEW)->addListener(this);
@@ -1112,7 +1112,7 @@ void SceneViewer::showEvent(QShowEvent *) {
//-----------------------------------------------------------------------------
void SceneViewer::hideEvent(QHideEvent *) {
- // Se il viewer e' hide e il preview e' attivo rimuovo il listner dal preview
+ // If the viewer is hidden and preview is activated, remove the listener from preview
if (m_previewMode != NO_PREVIEW)
Previewer::instance(m_previewMode == SUBCAMERA_PREVIEW)
->removeListener(this);