Jump to content
apeisa

Tempalte, tempalte, tempalte...

Recommended Posts

After 9 years using ProcessWire I still do multiple times a day a typo writing template as tempalte (probably write it wrong more often than right). I know few of my co-workers does the same. Is this curse for us Finnish people, or is tempalte thing in other parts of the world also?

  • Like 3
  • Haha 3

Share this post


Link to post
Share on other sites

No issue with "tempalte" but if if ever remember how to write "width" I'm sure I'll pokevolve into a 10x engineer haha. 

  • Like 2
  • Haha 3

Share this post


Link to post
Share on other sites

I think this is probably because in Finnish it is pretty rare to see L after P - I think probably only in words that come directly from foreign languages, like application => applikaatio etc.

Very frustrating, maybe we should have a module that adds tempalte as an alias for template... 😉

  • Like 2

Share this post


Link to post
Share on other sites

I'm not sure about the word "template", but I for sure have a few such words by myself as well. And I can't really blame my native language given I'm likely writing more english text than german ones at least on a physical keyword. At least for mac's there's a way to have aliases, which automatically expand to different text. There might be similar capabilities on windows as well. Maybe that's an option.

  • Like 2

Share this post


Link to post
Share on other sites

man...I make the same mistake like 10 times a day...I'm so frustrated about it...but glad that I'm not the only one ahah

  • Like 1

Share this post


Link to post
Share on other sites

Possibly because you type too quickly.

(With the Azerty keyboard) I sometimes, for example, typed gogole.com, in the url bar directly or in the search bar of another search engine, wanting to type google.com.

It must happen often, because Google bought it. It is redirected to its page.

  • Haha 1

Share this post


Link to post
Share on other sites

That's where a proper IDE should kick in, to do its stuff (auto-suggest/auto-complete etc.). Mere text-editors can only do so much...

With PW, that didn't really work so well for a long time. But if you enable the Functions API, and use page() instead of $page in your code, you'll get the hints in your working environment.

/**
 * Allow core API variables to also be accessed as functions?
 *
 * Recommended. This enables API varibles like $pages to also be accessed as pages(),
 * as an example. And so on for most other core variables.
 *
 * Benefits are better type hinting, always in scope, and potentially shorter API calls.
 * See the file /wire/core/FunctionsAPI.php for details on these functions.
 *
 * @var bool
 *
 */
$config->useFunctionsAPI = true;

 

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, dragan said:

That's where a proper IDE should kick in, to do its stuff (auto-suggest/auto-complete etc.)

Definitely benefitted from switching to PHPStorm this year haha, typos are less of a trouble! Although I still keep using emacs a lot, so I'm safe 50% of time.

1 hour ago, dragan said:

With PW, that didn't really work so well for a long time. But if you enable the Functions API, and use page() instead of $page in your code, you'll get the hints in your working environment.

This is super nice too!! But can you believe if feels "wrong" writing with functions API???  But since using PHPStorm it is kind of a no brainer to start using the functions API for the autocomplete benefits.

Share this post


Link to post
Share on other sites

I actually do like the functions api, although using it in one project only. But it doesn't help with selectors, which is where I type most of my tempaltes...

  • Haha 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...