yeecai / front-end-trivia

My collection of knowledge about JS/React/Css...topic interested in Issues.
0 stars 0 forks source link

Scripting #68

Open yeecai opened 1 year ago

yeecai commented 1 year ago
todo: 
1. toast.*(‘txt’) -> toast.*(t('txt')) 

toast\.(.*)\("(.*)"\)
toast.$1(t("$2"))
toast\.(.*)\((?!.*")(.*)\)
toast.$1(t($2))

3. <Button xxx>xxxx</Button>
 <LoadingButton xxxx>
     xxxx
   </LoadingButton>
  1. <TxButton
        ...
      >
        {buttonLabel} 
    </TxButton>

    <TxButton ([^>]+)>{([^<]+)} <TxButton $1>{t($2)} <TxButton([^>])>(\n\s)([^<]+)(\n\s) <TxButton (.?)>(\n\s)(.?)(\n\s*) <TxButton $1>$2{t('$3')}$4

  2. label={"Token Id"} (label|title)={"(.?)"} or (title)={(?!t(")(.?)} $1={t("$2")} title={"Liq. Price"} Header: "Position", Header: "(.*?)" Header: t("$1") value={value}

yeecai commented 1 year ago
<TxButton
        ...
      >
        {buttonLabel} 
</TxButton>

<TxButton ...

{t(buttonLabel)}

yeecai commented 1 year ago

2hours on this

yeecai commented 1 year ago

and I forgot loadingbutton and toast.*

yeecai commented 1 year ago

export PATH="$PATH:/path/to/your/project/node_modules/.bin" source ~/.zshrc