wordplaydev / wordplay

An accessible, language-inclusive programming language and IDE for creating interactive typography on the web.
Other
60 stars 22 forks source link

Account for name conflicts during project translation #486

Open amyjko opened 3 months ago

amyjko commented 3 months ago

Expected behavior

Our project translation feature should account for duplicate names when creating translations. For example, if a program like this were translated from Spanish to English, it should not create a conflict:

hola/es: 'hola'
hello/en: 'hi'
hola + hello

Actual behavior

Translating the above from Spanish to English creates a new name for hello named hola, which creates a duplicate name conflict.

Design specification

Detect when a conflict will occur with a new name, and instead of giving it the same name, append a number to 2 to the end of the name, to prevent the conflict.