Displaying 1 message
Dimitri Vulis
12/8/2022 at 12:30
Moving an earlier discussion from https://www.geni.com/discussions/258054

I currently have many Geni profiles near me containing names only in Russian (Cyrillic). I am responsible for creating many of these profiles when I imported a large Gedcom. I firmly believe that it is good practice to include an English transliteration in such cases. I can edit each profile and manually type in the English transliteration. I've already done this manually for a large number of such profiles. But it's a little typo-prone, and also, frankly, I'm too lazy to do it to a large number of profiles.

I tried to find a tool to help me automate this task. I hoped that SmartCopy might do it, but it does not.

Therefore I wrote a couple of very simple Chrome bookmarks / Javascipt macros that will help me automate two very specific procedures. I'm sharing them hoping that they might help others trying to automate their data entry on Geni. Both macros are invoked while https://www.geni.com/profile/edit_basics/id is open.

GeniMoveEn2ru moves all name fields from the English-US locale panel to the Russian locale panel.

javascript:(function(){const all_name_fields = ["title", "first_name", "middle_name", "last_name", "maiden_name", "suffix", "display_name", "nicknames"], from_locale="en-US", to_locale="ru"; for(var i=0, len=all_name_fields.length ; i<len ; ++i) {const name_field = all_name_fields[i], from_field = document.getElementById("page_profile_names_" + from_locale + "_" + name_field), to_field = document.getElementById("page_profile_names_" + to_locale + "_" + name_field); if (from_field && to_field && from_field.value.length>0) {to_field.value = from_field.value; from_field.value="";}}}());

I hardcoded the language pair because that's all I need now. It would not be hard to make the configugation more flexible.

GeniAddTranslit drafts an English transliteration for names in Russian. A little manual post-editing is needed sometimes.

javascript:(function(){const all_name_fields = ["title", "first_name", "middle_name", "last_name", "maiden_name", "suffix", "display_name", "nicknames"], from_locale="ru", to_locale="en-US",RuEnTransliteration={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"ts",ч:"ch",ш:"sh",щ:"shch",ъ:"'",ы:"y",ь:"'",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"Ye",Ё:"Yo",Ж:"Zh",З:"Z",И:"I",Й:"Y",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"Kh",Ц:"Ts",Ч:"Ch",Ш:"Sh",Щ:"Shch",Ъ:"'",Ы:"Y",Ь:"'",Э:"E",Ю:"Yu",Я:"Ya"};for(var i=0, len=all_name_fields.length ; i<len ; ++i) {const name_field = all_name_fields[i], from_field = document.getElementById("page_profile_names_" + from_locale + "_" + name_field), to_field = document.getElementById("page_profile_names_" + to_locale + "_" + name_field); if (from_field && to_field && from_field.value.length>0) {var inString=from_field.value, outString = ""; for(var j=0, l=inString.length ; j<l ; ++j) { symbol = inString[j]; findSymbolTranslit = RuEnTransliteration[symbol]; outString += (typeof findSymbolTranslit == "undefined") ? symbol : findSymbolTranslit;}to_field.value = outString;}}}());



rails-1a-012