question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Create key if it doesn't exist

See original GitHub issue

I don’t know if this is already in there, if so, I can’t get it to work.

Given en.yaml

label:
  a: "this is translated"

And say I use

<p>{{$t('label.b')}}</p>

Now this does obliviously not work. I would like to click the “pencil” icon and just translate it from the UI and the plugin should create the key if it does not exist, instead of having to create the label.b key first.

In this UI image

IF this exist, I can’t get it to work

I don’t see any errors in the output

And while we are at the feature requests, could you add the Danish flag ? 😆

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
antfucommented, Nov 26, 2019

@TheSinding There is a bug in the v0.x version and I have fixed that. Thanks again.

And glad to hear it works for you! 🚀

1reaction
TheSindingcommented, Nov 26, 2019

I see, I’ve been using the wrong extension ! Goddamn, so I was an idiot (again).

But I was enjoying even the “broken” extension, so great work dude! Keep it up!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python update a key in dict if it doesn't exist - Stack Overflow
The question is asking how to "update a key in dict if it doesn't exist" so the desired output would be for the...
Read more >
Add an item only when the key does not exist in dict in Python ...
In Python, you can add a new item to the dictionary dict with dict_object[key] = new_value . In this way, if the key...
Read more >
Python | Add to Dictionary If Key doesn't exist - thisPointer
This article will discuss how to add key-value pairs in the dictionary only when Key does not exist. Add a key-value pair to...
Read more >
8 Best Ways to Update Non-Existing Key in Python Dict - Finxter
To update a key in a dictionary if it doesn't exist, you can check if it is present in the dictionary using the...
Read more >
Check if a Key (or Value) Exists in a Dictionary (5 Easy Ways)
Learn how to use Python to check if a key (or a value) exists in a dictionary in a safe way, using the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found