Changeset 893 for trunk/Modules/Translation/LoadNames.php
- Timestamp:
- Mar 6, 2023, 1:48:45 AM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Translation/LoadNames.php
r888 r893 20 20 return $Text; 21 21 } 22 22 23 function ReplaceNotTranslated($orig,$tran,$Text,$ID,$Group) 23 24 { … … 44 45 $Text = str_replace('$r','<span Title="Znamená rasu hráče, překladu zachovej na stejné pozici." class="edit">$R</span>',$Text); 45 46 $Text = str_replace('$g','<span Title="Vybere oslovení podle pohlaví hráče, překladu zachovej na stejné pozici." class="edit">$G</span>',$Text); 46 foreach ($names as $Line) { 47 if (($_GET['ID'] <> $Line[0]) or ($Line[1] <> $_GET['GroupId'])) 48 if ($Line[3] <> '') { 49 $Text = $this->ReplaceTranslated($Line[2],$Line[3],$Text,$Line[0],$Line[1]); 50 51 } else { 52 $Text = $this->ReplaceNotTranslated($Line[2],$Line[3],$Text,$Line[0],$Line[1]); 47 foreach ($names as $Line) 48 { 49 if (($_GET['ID'] <> $Line[0]) or ($Line[1] <> $_GET['GroupId'])) 50 { 51 if ($Line[3] <> '') 52 { 53 $Text = $this->ReplaceTranslated($Line[2],$Line[3],$Text,$Line[0],$Line[1]); 54 } else 55 { 56 $Text = $this->ReplaceNotTranslated($Line[2],$Line[3],$Text,$Line[0],$Line[1]); 57 } 53 58 } 54 59 } … … 58 63 function LoadNames() 59 64 { 65 $User = ModuleUser::Cast($this->System->GetModule('User'))->User; 60 66 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 61 67 … … 72 78 $Text = $LineAJ[$Column]; 73 79 $names = array(); 74 if ($ this->System->User->Licence(LICENCE_USER))80 if ($User->Licence(LICENCE_USER)) 75 81 if (($GroupId < 4) or ($GroupId == 10) or ($GroupId == 11)) 76 82 { 77 83 //<span class="edit">barvou.</span> 78 84 $names = GetTranslatNames($Text, 0, GetTranslatNamesArray()); 79 } else { 80 if (($GroupId == 13)) { 85 } else 86 { 87 if (($GroupId == 13)) 88 { 81 89 $names = GetTranslatNames($Text, 0, array('Dictionary' => 'Text', 82 90 'TextGlobalString' => 'Text', 'TextArea' => 'Name', 83 91 'TextItemSubClass' => 'Name', 'TextCharacterRace' => 'Name1',), false); 84 } else { 92 } else 93 { 85 94 $names = GetTranslatNames($Text, 0, GetTranslatNamesArray()); 86 95 } 87 96 } 88 97 //$LineAJ[$Column] 89 98 return $this->ColorNames(htmlspecialchars($Text),$names); 90 99 }
Note:
See TracChangeset
for help on using the changeset viewer.