Jump to content
Sign in to follow this  
Beekingo

Twenty one theme hard-coded string

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

Share this post


Link to post
Share on other sites

You welcome @WHMCS Stephen

I will be adding more hard-coded texts as I found them.

homepage.tpl line 2

<h2 class="text-center m-4">Browse our Products/Services</h2>

/includes/domain-pricing.php line 59

<a href="{routePath('domain-pricing')}" class="btn btn-link btn-sm float-right">View all pricing</a>

 

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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.

 

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Hello @brian!,

This is covered in case #CORE-16031 with a workaround introduced in the linked topic.

The language string issue is included in the case.

All the best for the New Year.

Share this post


Link to post
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.

Share this post


Link to post
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.

Sign in to follow this  

  • Similar Content

    • By ptomter
      In header.tpl (twenty-one) following has no language string.
      <span class="input-group-text">Logged in as:</span>
    • By xyzulu
      Seeing as WHMCS don't have a list of the bugs they have had reported and are working on, I thought I'd create this thread to track the current 8.1 GA bugs. If you find any, please let me know and I will edit this post to add them (hopefully I have enough permission to do so). Below is the list of ones I am aware of:
      CORE-16022 double validation warning password reset page: https://whmcs.community/topic/304324-twenty-one-template-minor-tweaks/?do=findComment&comment=1346483 CORE-16025 twenty one theme hard coded strings: Twenty one theme hard-coded string - WHMCS 8.1 Beta Discussion Board - WHMCS.Community CORE-16026  client email history missing: https://whmcs.community/topic/304324-twenty-one-template-minor-tweaks/?do=findComment&comment=1346510 (this might be a showstopper for you)  
       
       
      PS WHMCS staff you are welcome to edit this post of mine to add any other bugs currently being worked on if you like.
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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