Repository: openstreetmap/iD (JavaScript)

Issue:
Suspicious names in non-English languages are not removed
**Describe the bug**
When a `building=garage` has `name=garage` iD suggest to remove the suspicious name. On the other hand if the same building has `name=гараж` (meaning "garage" in Bulgarian), iD doesn't suggest to remove that name. The same applies for `building=garages + name=гаражи`. 

**To Reproduce**
Steps to reproduce the behavior:
1. Go to https://www.openstreetmap.org/edit?way=469468413

**Expected behavior**
There should be a warning, like the one that shows for ways tagged with `building=garage + name=garage`.

**Screenshots**
![image](https://user-images.githubusercontent.com/19364673/209566705-c2ee8d5e-f1c4-42ba-949b-8a4c5dde8b45.png)
![image](https://user-images.githubusercontent.com/19364673/209566741-eeea0ed0-c5b3-4097-9db7-9c94a8d959f1.png)


**Additional context**





Fix (patch):
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ca0c66b0abd..8733e988532 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -51,6 +51,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
 #### :white_check_mark: Validation
 * Add warning if aeroways cross each other, buildings or highways ([#9315], thanks [@k-yle])
 * Warn when a way with more than the maximum allowed number of nodes is to be uploaded and provide a way to fix it ([#7381])
+* The Suspicious Names validator warning now compares the Name field to the preset’s name in the user’s language, not just the raw tag value (typically in British English). ([#9522], thanks [@k-yle])
 * Revalidate ways that are connected to the currently edited way to also properly update/catch _disconnected way_s and _impossible oneway_ errors ([#8911], thanks [@andrewpmk])
 #### :bug: Bugfixes
 * Prevent degenerate ways caused by deleting a corner of a triangle ([#10003], thanks [@k-yle])
@@ -71,6 +72,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
 
 [#7381]: https://github.com/openstreetmap/iD/issues/7381
 [#8911]: https://github.com/openstreetmap/iD/pull/8911
+[#9522]: https://github.com/openstreetmap/iD/issues/9522
 [#9634]: https://github.com/openstreetmap/iD/pull/9634
 [#9635]: https://github.com/openstreetmap/iD/pull/9635
 [#10003]: https://github.com/openstreetmap/iD/pull/10003
diff --git a/modules/validations/suspicious_name.js b/modules/validations/suspicious_name.js
index 369116becde..0a9bcd09d76 100644
--- a/modules/validations/suspicious_name.js
+++ b/modules/validations/suspicious_name.js
@@ -5,7 +5,7 @@ import { t, localizer } from '../core/localizer';
 import { validationIssue, validationIssueFix } from '../core/validation';
 
 
-export function validationSuspiciousName() {
+export function validationSuspiciousName(context) {
   const type = 'suspicious_name';
   const keysToTestForGenericValues = [
     'aerialway', 'aeroway', 'amenity', 'building', 'craft', 'highway',
@@ -45,9 +45,17 @@ export function validationSuspiciousName() {
     return false;
   }
 
-  function isGenericName(name, tags) {
+  /** @param {string} name @param {string} presetName */
+  function nameMatchesPresetName(name, presetName) {
+    if (!presetName) return false;
+
+    return name.toLowerCase() === presetName.toLowerCase();
+  }
+
+  /** @param {string} name @param {string} presetName */
+  function isGenericName(name, tags, presetName) {
     name = name.toLowerCase();
-    return nameMatchesRawTag(name, tags) || isGenericMatchInNsi(tags);
+    return nameMatchesRawTag(name, tags) || nameMatchesPresetName(name, presetName) || isGenericMatchInNsi(tags);
   }
 
   function makeGenericNameIssue(entityId, nameKey, genericName, langCode) {
@@ -105,6 +113,8 @@ export function validationSuspiciousName() {
 
     let issues = [];
 
+    const presetName = presetManager.match(entity, context.graph()).name();
+
     for (let key in tags) {
       const m = key.match(/^name(?:(?::)([a-zA-Z_-]+))?$/);
       if (!m) continue;
@@ -112,7 +122,7 @@ export function validationSuspiciousName() {
       const langCode = m.length >= 2 ? m[1] : null;
       const value = tags[key];
 
-      if (isGenericName(value, tags)) {
+      if (isGenericName(value, tags, presetName)) {
         issues.provisional = _waitingForNsi;  // retry later if we are waiting on NSI to finish loading
         issues.push(makeGenericNameIssue(entity.id, key, value, langCode));
       }