Skip to content

replace #3886

@Sultan-cell665

Description

@Sultan-cell665

I want to like "<":"smaller than",but i cant in my code,please help with to correct my code:
sozlik= {
"Á": "A", "á": "a",
"Ǵ": "G", "ǵ": "g",
"Ú": "U", "ú": "u",
"Ń": "N", "ń": "n",
"Í": "I", "ı": "i",
"Ó": "O", "ó": "o"
}
ozgertiwshi={
">":"úlken",
"<":"kishi",
"=":"teń",
"≠":"teń emes",
"≥":"kishi emes",
"≤":"úlken emes",
"&":"hám",
"|":"yamasa"
}
def slugify(text,seperator=None,lowercase=None,maxlenght=None,entities=None):
lenght=len(text)
index=0
natiyje=[]
while index<lenght:
harip=text[index]
if harip in sozlik:
natiyje.append(sozlik[harip])
elif lowercase==True:
natiyje.append(harip.lower())
elif lowercase==False:
natiyje.append(harip)
if index==maxlenght:
break
index+=1
jiynaw="".join(natiyje)
if seperator:
jiynaw=jiynaw.replace(" ",seperator)

while index<lenght:
    belgi=text[index]
    if belgi in ozgertiwshi:
        natiyje.append(ozgertiwshi[belgi])
    else:
        natiyje.append(belgi)
    index+=1
jiynaw="".join(natiyje)
if entities==True:
    jiynaw=jiynaw.replace("<",">",ozgertiwshi)
return jiynaw

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions