8 ms·
This is because "Trash" is just a label. The "Send to trash" button simply is a shortcut to add the trash label. If you called that the "bin" label in England
by londons_explore 6y ago
This is because "Trash" is just a label. The "Send to trash" button simply is a shortcut to add the trash label.
If you called that the "bin" label in England, then functionality could break when the user switches languages... Now they have a bin and a trash, with different things in!
Or you could write the code to relabel all the users emails when they changed language...
But what if they had already manually created a label called "bin" then the auto-re-labeler will cause loss of data...
There is no perfect solution here... Any solution has unexpected behaviour for some things a user might want to do. Considering that, I think what is there is one of the least bad solutions...
- gommm 6y agoI love Apple's solution when it comes to localization, they will search both the non-localized name and the localized name. So if you're looking for Image Capture, you can find it with Transfert d'Image and with Image Capture. In the case of Gmail, it would mean that you could search both for in:Bin and in:Trash. The only issue would be if someone creates an additional Bin label in a US locale, then in UK, when searching for that label it would also show items in the trash but that's a better trade of I think.
- int_19h 6y agoThis is also how localized special folder names (Documents, Pictures etc) work in Windows. And I think it's also the same in KDE and Gnome?
- londons_explore 6y agoOnly in the search index... If you try to install your application in "C:\Program Files\" on a non-english version of windows, you'll have a bad time...
- kryptiskt 6y agoI use Swedish Windows, and here "C:\Program\" (the localization) and "C:\Program Files\" both work fine and go to the same place.
- int_19h 6y agoNot since Vista. These days, you'll always have "Program Files", and if you have the OS configured for a different locale, it'll create a hard link for the localized name. The Windows shell (including the standard file picker dialogs etc) will also use the localized name preferentially whenever it has to display a path that contains one of those folders, but still allows verbatim paths to be used wherever text input is allowed.
- jan6 6y agowell, gnome creates folders in whatever language you installed with, tho it can translate the file manager's sidebar items, I think... so a change of locale means you'd still have the old dir left, and show as old name everywhere except the special shortcuts
- ben509 6y agoAppleScript, for all its faults, handled localization quite impressively. It parsed the whole script into an abstract representation, and could then could display it in another language as needed.
- saagarjha 6y agoSadly this feature never got used for making a better frontend to it :(
- srtjstjsj 6y agoBut none of those languages was a sane programming language. The vocabulary doesn't matter when the grammar is an incomprehensible pidgin. Apple script is the quintessential Jobsian "form, not function"
- asveikau 6y agoI think this is a good solution, but gmail also lets you create a filter based on a search. So if search is sensitive to the current locale, your filters could break changing the language. [Maybe filters made from searches against a localized label could be converted to language-neutral at storage time...]
- sarabande 6y agoCouldn't they just disassociate "Trash" with the label concept? On the backend, implement special logic for the "trash" function instead of tying it to a label, and you can solve the problem.
- namdnay 6y agoThis is probably what would happen if gmail was a corporate solution: one customer executive would shout about it, and there would be this type of disgusting hack. Fast forward 5 years, and people then wonder "why are all our internal tools so crappy compared to free cloud stuff?"...
- pwinnski 6y agoThey already treat Trash/Bin as a special concept internally. They have since launch. You cannot have 'Trash' and other tags/labels, like 'Inbox' set at the same time, for instance. So it might be a disgusting hack, but it's been whatever it is since launch, although incompletely.
- edent 6y agoEach folder has a unique ID. The label in the UI is merely a pointer to that ID. So all Gmail has to do when it sees `in:$foo` is map `$foo` to the right internal ID based on the interface language. This isn't a new concept in computer science.
- namdnay 6y agoI guess the limitation there would be that you would have mayhem on stackoverflow, with Brits not understanding why a formula posted by an american doesn't work for them :)
- hugh-avherald 6y agoBut this can happen in plenty of other ways. For example sorting character vectors is dependent on locale. Arithmetic on times too.
- jan6 6y agoI especially hate the way gnu utils treat character groups like [:alnum:] which, if you have utf8 version of a locale, matches characters in ANY unicode language set... so if you, say, grep for numbers in /dev/urandom with a shell script, you can end up with, say, some characters that are technically numbers but in a totally different language, say, arabic, or hebrew...
- Frost1x 6y agoEssentially, you just need a simple mapping system to the actual data. Have labels point to a map that points to the correct data. Probably an oversight or a low priority bug for the Gmail team. Could also be something complicated in the underlying infrastructure that makes it difficult but I see no reason why it couldn't be abstracted and managed in the frontend as part of localization. Its always easier to talk about things and handwave without understanding problems that may cause with other underlying architecture.
- julianlam 6y ago
- CodesInChaos 6y agoUsing a surrogate key for labels would help a lot. That still leads to complications when user defined labels match localized names of built-in labels, but you could skip localization in those cases, use disambiguation (e.g. show it as "bin (built in)", reserve those names, etc.
- londons_explore 6y agoDisambiguation strategies are hard... Imagine you call it "Bin", unless that name is ambiguous, in which case you call it "Bin (built in)". Now, when the user does a search, they need to search for "In:'Bin (built in)'". Except when they delete the label called Bin, now the search terms they must use changes... All their saved searches and bookmarks with search terms in the URL would break too. Reserving the names in all locales might work, although I could imagine quite a few users being frustrated they can't name something without realising that the word they are trying to use means something in some language they don't even speak.
- mikelward 6y agoThen what happens when you add a new locale? I think to solve this 100% you need namespaces.
- onion2k 6y agoThere is no perfect solution here. No one is suggesting that there is, but there are definitely better solutions than what GMail is doing.
- lewilewilewi 6y agoWhat about a 'did you mean "in:trash"' if it detects the localised variant?
- murermader 6y agoThis does not sound like a hard problem at all. Just check the query for localizable keywords ( :{KEYWORD} ), and replace that with the word it represents. So if the query is "in:bin" just convert that to "in:trash" and use that for searching, without the user knowing. Then you also have no problem with switching languages.
- reaperducer 6y agoIf you called that the "bin" label in England, then functionality could break when the user switches languages Not if you designed the system with localization in mind from the beginning. I agree, localization is hard. I have to do it for the web sites I build. But I build them with this kind of abstraction in mind, and am able to convert the mechanics of a web site to another language in just a week or so working with a translator. Then they do the content, and I add that in, and it's done and good. I've added up to five languages to some of the sites so far, and the language audits have turned up no problems, and no complaints from the users. (We do actual human testing with actual humans. No bogus "telemetry.") Admittedly, my sites don't serve nearly as many people as GMail, but they have to be as close to perfect as possible because I'm in healthcare, and conveying important information. At the same time I'm able to do it with just me, while Google has a trillion dollars to throw at the problem. The professional translators I work with say that to them, it looks like Google translates its web sites with Google Translate, rather than with a native-speaking human being.
- wodenokoto 6y agoSo what do you do when a en_GB user creates a folder named Trash and switches to en_US and her “bin” folder now needs to be displayed as Trash? How do you resolve her saved searches and labeled items in a way such that the user can also tell them apart?
- dash2 6y agoMaybe use reserved words? This doesn't seem like an impossible obstacle to surmount.
- thesuitonym 6y agoLabels should reference GUIDs behind the scenes. If a user does this, they will just be unsure which one is the actual Trash label. When searching, Gmail should give results from both labels.
- PaulDavisThe1st 6y ago
- masukomi 6y ago> This is because "Trash" is just a label. The "Send to trash" button simply is a shortcut to add the trash label. this basically boils down to "because they didn't consider internationalization or localization when coding it." It is NOT a valid excuse for this not working from what was already a multinational company when GMail was introduced. > Now they have a bin and a trash, with different things in! translation: "but there's tech debt" Not an excuse. Especially from a company with enough money to fix it without even noticing the effect on their bottom line. It didn't have to be coded to have the concept have a 1:1 correspondence to the name. "spam" and "trash" could have been conceptual objects with multiple localized interfaces for humans.
- joshuamorton 6y agoThen what happens when you create a custom label "bin" and relocalize to british?
- gmadsen 6y agoprefix the localized bin for users with an existing bin
- joshuamorton 6y agoWhat? We're taking about tags, so if I create a custom "bin" label and move to england, what do I type to see my trash?
- robotresearcher 6y agoReserve a system label prefix e.g. '_' and forbid users to create labels with that prefix. Then the labels '_Trash' and '_Bin' are exact aliases, and users can't accidentally collide with them.
- joshuamorton 6y agoAh so now I have to search in _Trash instead of in Trash which makes label discovery and use worse and confusing for all users.
- Exuma 6y agoNot to mention they actually correspond with different IMAP folders too, so you could change that and suddenly the IMAP folders in your mail account will sync differently.
- deleted 6y ago[deleted]
- zwayhowder 6y agoYou reserve the various names so that users can't create labels that conflict. I think most UK (and us Aussie) users would be quite happy not to be able to create a folder called Trash in exchange for having a folder that represents what we think it should be called.
- phjesusthatguy3 6y agoGoogle didn't ask me if I put my trash in a can or my litter in a bin; I just have a folder where my deleted emails go. Google has the resources to find an answer to your question. It's embarrassing to all of us that they refuse to do so.
- mcv 6y agoBest solution is to use all labels for the trash in all languages as an alias for the same trash folder. The problem here is the tight coupling between the name and the functionality.
- ta1234567890 6y ago> This is because "Trash" is just a label. Typical "smart" solution, that completely fails when meeting the real world. I wonder how many horrible software issues we've created trying to force smart/elegant solutions and then having either to: completely rebuild the feature, create horrible workarounds, or just let users deal with it however they can (which seems it's the Gmail way).
- dfcowell 6y agoNamespaced system labels (e.g. gmail:trash, gmail:bin) with one canonical representation which is actually stored in the database, these can be aliased in the backend to all of the localized labels. Custom user labels can be arbitrary, non-namespaced free text using any string except “gmail”.