Jump to content

Twenty one theme hard-coded string


Beekingo

Recommended Posts

Hi!

I found that in login.tpl, line 55 here is something hard-coded and is not translatable.

<small>Not registered?</small>

I changed it to my own-made string.

<small>{lang key='userLogin.notRegistered'}</small>

and added this to my lang override files.

$_LANG['userLogin']['notRegistered'] = "¿No estás registrado?";

Cheers.

Edited by Beekingo
Link to comment
Share on other sites

  • WHMCS Technical Analyst II

Hello @Beekingo

Thanks for taking the time to report this, appreciated.

I see it https://github.com/WHMCS/templates-twenty-one/blob/master/login.tpl#L55

I've opened a case #CORE-16025 with our team to have that resolved.

Season's greetings and all the best for the new year.

 

Link to comment
Share on other sites

22 minutes ago, Beekingo said:

header.tpl line 51

if we're playing hardcoded string bingo (like shooting fish in a barrel it seems!), then there's another one in header.tpl line 24...

<span class="d-none d-sm-inline">Notifications</span>

and contact.tpl line 5...

<h6 class="h3">Contact Us</h6>

one would hope things like this would be spotted before release of a GA.

Link to comment
Share on other sites

I am discovering the strings by looking at what things are not translated into Spanish on the front end.

Then I do a search. If I start to review all the code I go crazy heh.

@WHMCS Stephen there is any way I can help to complete the missing translations in the main spanish.php file?  I usually use a file in /override for my own, but i think it would be better if the completed translations are available for everyone in /lang/spanish.php.

Link to comment
Share on other sites

another one - /store/ox/index.tpl line 126

{$plan->pricing()->first()->toFullString()}<small>/user</small>

store/order.tpl line 183..

                                        {if is_null($upsellComparison->diff({$pricing->cycle()}))}
                                            {$promotion->getCta()} {$upsellProduct->name} from just {$upsellProduct->pricing()->best()->breakdownPrice()}
                                        {else}
                                            {$promotion->getCta()} {$upsellProduct->name} for just {$upsellComparison->diff({$pricing->cycle()})->breakdownPrice()} more
                                        {/if}

... although this specific issue has existed with this template since at least v7.8 and has never been fixed... applies to both Six and 21.

i've given up looking for more.

btw - seeing "..." hardcoded has always annoyed me as it's usually next to a language string, e.g Learn More - they should include it in the string and then if it's not relevant for another language, it can be easily changed in an override.

8 minutes ago, Beekingo said:

I am discovering the strings by looking at what things are not translated into Spanish on the front end.

oh I was just choosing random templates in the GitHub and flying through the code visually - the hardcoded text stands out a mile as WHMCS have done this for years.

9 minutes ago, Beekingo said:

Then I do a search. If I start to review all the code I go crazy heh.

 fou5.gif

11 minutes ago, Beekingo said:

there is any way I can help to complete the missing translations in the main spanish.php file?  I usually use a file in /override for my own, but i think it would be better if the completed translations are available for everyone in /lang/spanish.php.

I would have thought posting them here will do - it looks like someone from WHMCS is reading the thread, so your translations could be passed to the developers for inclusion in the next maintenance release... I know in years gone by, they were happy to receive translations via tickets, so I would have though either route would be valid.

Link to comment
Share on other sites

  • WHMCS Technical Analyst II

Hello @Beekingo and @brian!,

We do rely on the dedication of our users for contributing translations, as we find real life translations are typically of a much higher quality compared with using automated translation systems.

If you have any suggestions for improvements, or a new language file you are willing to contribute, please get in touch via a support ticket and we can have this cased and triaged accordingly.

Confirmed and added to the case:

https://github.com/WHMCS/templates-twenty-one/blob/master/header.tpl#L51

https://github.com/WHMCS/templates-twenty-one/blob/master/contact.tpl#L5

https://github.com/WHMCS/templates-twenty-one/blob/master/store/ox/index.tpl#L126

https://github.com/WHMCS/templates-twenty-one/blob/master/store/order.tpl#L184

https://github.com/WHMCS/templates-twenty-one/blob/master/store/order.tpl#L186

 

Regarding the Six template I've opened a case #CORE-16027 with our team to have that resolved for the following lines:

https://github.com/WHMCS/templates-six/blob/master/store/ox/index.tpl#L126

https://github.com/WHMCS/templates-six/blob/master/store/order.tpl#L174

https://github.com/WHMCS/templates-six/blob/master/store/order.tpl#L176

 

Thanks again for your input.

 

Link to comment
Share on other sites

19 hours ago, WHMCS Stephen said:

Confirmed and added to the case:

while we're addressing the hardcoded text, is there any reason why "Contact Support to Purchase" is still hardcoded twice in standard_cart/configureproductdomain.tpl ??

https://github.com/WHMCS/orderforms-standard_cart/blob/master/configureproductdomain.tpl#L281

https://github.com/WHMCS/orderforms-standard_cart/blob/master/configureproductdomain.tpl#L309

that issue must have existed since v6.1 - ironically, there is a language string that exists for that phrase, but it's not being used.

Link to comment
Share on other sites

not a text issue with 21, but I see no point in starting a new thread for this - I just found an issue in the Six viewquote.tpl template...

https://github.com/WHMCS/templates-six/blob/master/viewquote.tpl#L11

    <link href="assetPath file='invoice.css'}" rel="stylesheet">

there is a missing opening { before the assetPath - it's absence is breaking the layout of the page.

Link to comment
Share on other sites

  • WHMCS Technical Analyst II

Hello @brian!,

I've opened a case #CORE-16070 with our team to have that looked at and resolved.

I cannot provide an estimated time for completion for this however once we resolve cases they are available in our change log at https://changelog.whmcs.com/ 

Thanks.

Link to comment
Share on other sites

  • 10 months later...
On 12/30/2020 at 1:22 AM, WHMCS Stephen said:

 

https://github.com/WHMCS/templates-twenty-one/blob/master/includes/domain-search.tpl#L59

Sadly, the fix is not included in any of the updates to this day. I did it manually, and the string doesn't translate. Even if I directly change the original text "View all pricing" to any, no change will take effect ..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated