Soft Rejection!!!

  1. This has already been mentioned in a previous review and it was not properly addressed: Code needs to be refactored. You are counting on the fact that “LOADING” is a word of 7 characters. But what happens when a “LOADING” translation has more or less than 7 letters? :slight_smile:

reviewer has focused an important issues when a customer will use your theme and he will use French as their website language then when he will translate ‘LOADING’ (7 characters) into ‘CHARGEMENT’ (10 characters). then your coding for substr will not work. as like:

echo substr("LOADING",0,-6);
will return L
echo substr("CHARGEMENT",0,-6);
will return CHAR
echo substr(("LOADING",6,1));
will return G
echo substr("CHARGEMENT",6,1);
will return M

So, your code will not work when the theme will translate into another langauage.

Hope you understand.


1 Like

Any Idea To Change The Code?

it will not be easy when you will use substr to split the word into each single character. you can study on strlen but not sure will it work or not when come to translate into another language.

Great Explanation :ok_hand::ok_hand::ok_hand:

1 Like