mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 18:34:02 +00:00
- i18n scanner: lastError sink, no false sinks on defaults and ternaries - shared src/i18n/marker.js for modules that only mark strings - wind field messages move to wind/fields.js; CITY_POIS imports from cityPois.js - drop review IDs, change history and stale references from comments and docs Co-Authored-By: Claude Opus 5.5 <[email protected]>
25 lines
765 B
JavaScript
25 lines
765 B
JavaScript
import { msg } from '../i18n/marker.js';
|
|
|
|
/**
|
|
* Tool name for a pointer owner. Owner ids (inputOwnership.js) never go on
|
|
* screen; callers translate the English name with translateKnown().
|
|
*/
|
|
|
|
const POINTER_OWNER_NAMES = Object.freeze({
|
|
draw: msg('Draw'),
|
|
directions: msg('Directions'),
|
|
'recent-imagery-box': msg('Recent imagery'),
|
|
});
|
|
|
|
/**
|
|
* English display name of a pointer owner. An owner without a registered name
|
|
* falls back to its id.
|
|
* @param {string|null} owner Pointer-owner id, as `pointerOwner()` returns it.
|
|
* @returns {string}
|
|
*/
|
|
export function pointerOwnerName(owner) {
|
|
const id = typeof owner === 'string' ? owner.trim() : '';
|
|
if (!id) return '';
|
|
return Object.hasOwn(POINTER_OWNER_NAMES, id) ? POINTER_OWNER_NAMES[id] : id;
|
|
}
|