Skip to content

Commit

Permalink
Various typo and translation of source comments + whitespace tweaks
Browse files Browse the repository at this point in the history
Found via `codespell -q 3 -S *.ts,thirdparty,./toonz/sources/common/twain -L appy,ba,chunck,datas,forse,inbetween,inly,inout,ket,pevent,possibile,siz,strack,upto,vertexes`
  • Loading branch information
luzpaz committed Apr 7, 2022
1 parent 4dd8f76 commit 266edb5
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion toonz/sources/common/tgeometry/tcurveutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion toonz/sources/common/tvectorimage/outlineApproximation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions toonz/sources/common/tvrender/tfont_qt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
10 changes: 5 additions & 5 deletions toonz/sources/include/tregion.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ class DVAPI TRegion {
};

//-----------------------------------------------------------------------------
/*Spostata in tregion.cpp
/* Moved to tregion.cpp
inline int TRegion::getStyle() const
{
int ret = 0;
Expand All @@ -271,10 +271,10 @@ class DVAPI TRegionFeatureFormula {
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);
Expand Down
2 changes: 1 addition & 1 deletion toonz/sources/include/tsound_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
//----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion toonz/sources/include/tspectrum.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class DVAPI TSpectrumT {
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;
Expand Down
6 changes: 3 additions & 3 deletions toonz/sources/tnztools/toolutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}

Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions toonz/sources/toonz/castviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions toonz/sources/toonz/sceneviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 266edb5

Please sign in to comment.