Repository: godotengine/godot
File: editor/scene/3d/node_3d_editor_plugin.cpp (C++)

Code before:
				}

			} else {
				const real_t center_click_dist = click.distance_to(_edit.center);
				const real_t center_inters_dist = intersection.distance_to(_edit.center);
				if (center_click_dist == 0) {
					break;
				}

				const real_t scale = center_inters_dist - center_click_dist;
				motion = Vector3(scale, scale, scale);
			}

			motion /= click.distance_to(_edit.center);

			if (_edit.snap || spatial_editor->is_snap_enabled()) {
				snap = spatial_editor->get_scale_snap() / 100;
			}
			Vector3 motion_snapped = motion;
			motion_snapped.snapf(snap);
			// This might not be necessary anymore after issue #288 is solved (in 4.0?).
			// TRANSLATORS: Refers to changing the scale of a node in the 3D editor.
			set_message(vformat(TTR("Scaling: (%s, %s, %s)"),
					String::num(motion_snapped.x, snap_step_decimals),
					String::num(motion_snapped.y, snap_step_decimals),
					String::num(motion_snapped.z, snap_step_decimals)));
			if (local_coords) {
				// TODO: needed?
				motion = _edit.original.basis.inverse().xform(motion);
			}

			apply_transform(motion, snap);
		} break;

		case TRANSFORM_TRANSLATE: {
			Vector3 motion_mask;
			Plane plane;
			bool plane_mv = false;

			switch (_edit.plane) {
				case TRANSFORM_VIEW:
					plane = Plane(_get_camera_normal(), _edit.center);
					break;
				case TRANSFORM_X_AXIS:
					motion_mask = spatial_editor->get_gizmo_transform().basis.get_column(0).normalized();
					plane = Plane(motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized(), _edit.center);
					break;
				case TRANSFORM_Y_AXIS:
					motion_mask = spatial_editor->get_gizmo_transform().basis.get_column(1).normalized();
					plane = Plane(motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized(), _edit.center);
					break;

Review comment (suggestion):
```suggestion
			set_message(vformat(TTR("Scaling: %s"), vformat("%.*v", snap_step_decimals, motion_snapped)));
```

Code after:
				if (center_click_dist == 0) {
					break;
				}

				const real_t scale = center_inters_dist - center_click_dist;
				motion = Vector3(scale, scale, scale);
			}

			motion /= click.distance_to(_edit.center);

			if (_edit.snap || spatial_editor->is_snap_enabled()) {
				snap = spatial_editor->get_scale_snap() / 100;
			}
			Vector3 motion_snapped = motion;
			motion_snapped.snapf(snap);
			// This might not be necessary anymore after issue #288 is solved (in 4.0?).
			// TRANSLATORS: Refers to changing the scale of a node in the 3D editor.
			set_message(vformat(TTR("Scaling: %s"), vformat("%.*v", snap_step_decimals, motion_snapped)));
			if (local_coords) {
				// TODO: needed?
				motion = _edit.original.basis.inverse().xform(motion);
			}

			apply_transform(motion, snap);
		} break;

		case TRANSFORM_TRANSLATE: {
			Vector3 motion_mask;
			Plane plane;
			bool plane_mv = false;

			switch (_edit.plane) {
				case TRANSFORM_VIEW:
					plane = Plane(_get_camera_normal(), _edit.center);
					break;
				case TRANSFORM_X_AXIS:
					motion_mask = spatial_editor->get_gizmo_transform().basis.get_column(0).normalized();
					plane = Plane(motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized(), _edit.center);
					break;
				case TRANSFORM_Y_AXIS:
					motion_mask = spatial_editor->get_gizmo_transform().basis.get_column(1).normalized();
					plane = Plane(motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized(), _edit.center);
					break;
				case TRANSFORM_Z_AXIS:
					motion_mask = spatial_editor->get_gizmo_transform().basis.get_column(2).normalized();
					plane = Plane(motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized(), _edit.center);
					break;
				case TRANSFORM_YZ:
					plane = Plane(spatial_editor->get_gizmo_transform().basis.get_column(0).normalized(), _edit.center);
					plane_mv = true;
					break;