teleren/devto huggingface dataset:
How to add lang option in custom components.
Tags: aem, i18n, components, aemnotes
Published: 2024-03-25 20:42:16

---
title: How to add lang option in custom components.
published: true
description: How can you add basic language options for dialog fields in your custom components. 
tags: aem, i18n, components, aemnotes
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2024-03-21 20:34 +0000
---

## How to add language option with custom component using CRXDE
***Scenario*** Adding three language option with your custome component. ***English***, ***Spanish*** and ***French***.

Create **i18n** folder in your component.
Create ***Subfolders*** for each languages within ***i18n***
**en**
**es**
**fr**
Component structure will look like this 👇

![i18n base folder structure](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5lyg1o0krrpxeqnemjgt.png "i18n base folder structure")

Add Mixins.. to these folders with **type** ***mix:language***
![add mixins to lang folder](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2e881olhu28627glvsc9.png "Add mixins to lang folder")

After adding mixins. Add a property called ***jcr:language*** with language ***iso code*** i.e **french it will be fr**

Within those folder **create node** with exect same name as an item in your component with ***primaryType: sling:MessageEntry***
Now add two properties
1. sling:key
2. sling:message
Sling:key is ***same*** for all language and change the ***sling:message*** properties with your desire custom value in each language.
![key and message property](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ynjtylg5j7k2wt6a114v.png "add key and message propeties")

**Test**
Change the prefered language from profile->prefrences and check in the component weather the lang is chages to your custom meesage attached to the lanaguage.

Hope this is helpful.

Thank you!
Refactoring!
Published: 2024-03-25 20:36:03

📘 Reading "Refactoring" by the Martin Fowler? Here are three profound insights that resonated with me:

1️⃣ "Any fool can write code that a computer can understand. Good programmers write code that humans can understand."

This reminds us that writing clean, readable code is an art. It's not just about making the computer happy, but ensuring our code is maintainable and comprehensible for fellow developers (and our future selves!).

2️⃣ "Three strikes, then refactor."

If you find yourself making similar changes in multiple places, it's a sign that your code needs refactoring. Don't be afraid to step back and restructure - technical debt accumulates quickly otherwise.

3️⃣ "When you need to make a change, first make the change easy, then make the change."

Wise words! Before diving into a complex change, take the time to refactor and simplify the affected areas first. This principle ensures that changes are made with clarity and confidence.

Fowler's advice highlights that refactoring isn't just a chore - it's a critical practice for creating maintainable, extensible codebases. His insights are timeless gems for any developer striving for excellence in their craft.

What resonated most with you from this legendary book? Let's discuss in the comments! 📖

Jaber Said
I built my first fingerprint attendance monitoring - Episode 1
Tags: docker, architecutre, python
Published: 2024-03-25 20:19:54

The new hype of the technology involving to boost the productivity every company decided to install fingerprint machines. The providers has given us a program that only runs only on the windows and the best part was it has a MS Access database. da!
But I ended up finding a python library that supports for the types of fingerprint machines we are having. So I pulled a architecture. I had several things in my mind. I'm listing them to make you clear out the doughts. 

- Simple arhitecutre
- Space to upgrade the and new adition without breaking the current oprations.
- Needed to try out some new concepts. 
- Lowest time to get the 1st result. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h7buw2f4dvbg1lqc5fk4.png)

As per the basics of the presentations techniques we should leave a 'hook'. So in next episodes I will explain why I choose this. What are my plans for future to expand this. 
So stay tuned for the next episode.
Day 2 & 3 Completed
Tags: hustling, career, discuss, learning
Published: 2024-03-25 20:11:20

I have Completed my 2 & 3rd Day.

So Here is the Recap of my Day - 2 & 3.
✅ Learn About Advanced Typescript API 
```js
    Pick 
    Partial
    Record and Map [JS Specific]
    ReadOnly
    Exclude
    Type Inference in Zod
```
✅ Learn about prisma 
```js
    Learn these things in prisma
    Installation
    Defining your Schema
    DB Migration
    Client Generation
    Querying the DB
    Making Relationships in Prisma
    How SQL Join Works in Prisma
```
✅ Revise My Solidity Notes for my final year Project.


These are the things I have done, if you guys want a detailed blog post regarding the topics I am covering. Pls let me know.☺️

Thanks.
How to build trustworthy AI Systems with Responsible AI tools
Published: 2024-03-25 20:00:23

Responsible AI has been a hot topic in the recent months due to the rapid AI innovations and breakthroughs. From daily news headlines to grandma, people are excited and concern about the use or misuse of AI.  Governments are responding by implementing regulations on AI.  As a result, responsible AI is now a competitive skill that is in demand for the AI developer community to have.

✨ Join the **#MarchResponsibly** challenge by completing hands-on workshop and share your earned badges.

Checkout my colleague Lee Scott's [blog post](https://aka.ms/march-rai/build-trustworthy-ai) on the 3-part Azure Responsible AI hands-on workshop that we deliver to startups. Large tech cooperations are no longer the only ones that need to worry about violating responsible AI standards. Startup also need to address AI risks or harms from their AI solution when working with investors, partners and customers.

The blog includes the labs on the following practical responsible AI tools & service:
- Azure Content Safety
- Azure Prompt Flow
- Azure Responsible AI dashboards.
 

👉🏽 Checkout Lee Scott's blog with the videos & workshop links:  https://aka.ms/march-rai/build-trustworthy-ai



🎉Happy Learning :)
Glam Up My Markup: Camp bunny hop 🐰
Tags: frontendchallenge, devchallenge, css, javascript
Published: 2024-03-25 20:00:00

_This is a submission for DEV Challenge v24.03.20, Glam Up My Markup: Camp Activities_

## What I Built

I created a colorful form for the camp activities, which should remind you of a wooden bulletin board, which you can also find in summer camps. And since Easter is just around the corner and cute bunnies make everything better, I used bunnies to visualize the selected activity

## Demo

{% codepen https://codepen.io/flos-code/pen/Pogjwzg %}


## Journey

When looking at the HTML code, I noticed that there were no image tags, which is why I worked exclusively with background images to achieve my goal.

Depending on the selected activity, a suitable image is displayed in the h1. To recognize the image and the text in the h1 I use a combination of padding and flexbox to place the text at the bottom center of the image but not too far down.

I added the required attribute to the selection via JavaScript and set the first option to disabled and selected so that it only behaves like a placeholder for the selection.

I then adjusted the colors of the remaining elements such as the textarea or the button to match the images.
And when submitting the form, you receive feedback via an alert that the information has been successfully submitted.

All images were generated with AI. And unfortunately the end product is a bit too high in my opinion, which could be adjusted with better fitting images or adjustments to the HTML itself, for example.
Understanding the Difference Between Bugs, Errors, Defects and Failures in Software Testing
Tags: webdev, softwaredevelopment, testing, programming
Published: 2024-03-25 19:54:27

In the world of software development and testing, there are different terms used to describe problems encountered during the development phase. Understanding the differences between these terms is critical to effective communication and problem solving. 
In this blog post, we'll explore the differences between **bugs**, **defects**, **errors**, and **failures** in software testing.

### Errors 
Errors, also called  mistakes, are human actions or incorrect assumptions. done during software development. They can occur at any stage from data collection to coding and testing. Errors can be caused by misunderstanding the requirements, coding errors or program logic errors. These mistakes can cause software defects or bugs.
For example, a programmer or a software developer may use a variable name or function name incorrectly.This will result in a syntax error

### Bugs
Bugs are errors or omissions in software code that cause it to behave unexpectedly or incorrectly. 
In simple terms, we can say that a bug is a deviation between the expected results and the actual results of an application.
When a programmer writes code that contains errors, those errors show up as bugs when the software is run. Bugs are usually detected by the testing team during testing

### Defects
Defects, also known as problems or anomalies, are deviations from the expected behavior or requirements of the software. These indicate problems or bugs in the software that need to be fixed. Defects can be caused by coding errors, design errors, or misunderstanding the requirements. Defects are usually discovered during software testing, but users can also report them after the software is released.

### Failures
Failures occur when the software experiences errors during execution that cause the program to malfunction or crash . Once a software has been completed and delivered to the user and  the  customer finds any issue with the software, then such issues are termed as failures

### Conclusion- 
In conclusion, It is possible to classify errors as mistakes made by programmers during the coding process, defects as mistakes discovered during the development phase's unit testing, bugs as mistakes discovered during the testing phase, and failures as mistakes discovered at the end user's end.
Scripts should be written using the project main language
Tags: opinion, softwareengineering, scripting, python
Published: 2024-03-25 19:43:54

This is an **hot-take** I've been feeling for a long time.

Almost all projects I've worked on have scripts we wrote to automate a **repetitive process**. Consecutively, the majority of the scripts became obsolete and unmaintainable after some weeks, because we either didn't need them anymore or they have become too **complex** to be looked at. Afterwards, these scripts are either refactored or they stay forever in the *scripts graveyard*.

<figure class="row flex-center" style="display:block;margin-left:auto;margin-right:auto"><img src="https://raw.githubusercontent.com/freitzzz/cinderela/master/blog/general/clipart/tombstone-128.png" alt="A clipart styled tombstone labeled with RIP" style="display:block;margin-left:auto;margin-right:auto"><figcaption style="text-align:center"><p>Never forget to pay your respects for all the scripts we left to rot 🫡 (<a href="https://clipart-library.com/clipart/rTjKGajec.htm">Source</a>)</p></figcaption></figure>

I think one of the major reasons that lead to this outcome is that we wrote the scripts in `Bash` or `Python`. Don't get me wrong, I'm a big fan of the two, but I feel like teams can **win** more if they write scripts using the **main** language their project is developed with. From the start, *time* and *effort* required to write them is reduced since:

- The learning curve is **minimal**, since you already know the corners of the language
- Internal language APIs can be leveraged, which drastically changes the **mental model** to write the script (for the better)
- Scripts feel more **natural** and eventually **maintainability** increases. Team members are **familirized** with the language!
- Development machines **compatibility** increases. Windows users can finally run all scripts. 🤭  

The downside of going on this direction is the main language **runtime** support. Not every language is multi-paradigm or was designed to support scripting. For example, writing scripts on `JVM` languages would require additional effort to build a **toolchain** that compiles and runs files on the fly, with short start time. But if you work on a web frontend project (`JavaScript`), the power is in your hands.

At the end of the day, it is up to teams to talk and establish an **agreement** on which language fits best their needs and **standardize** their scripting language. If they can use the main language, awesome. If they can't, an higher level scripting language with native support (e.g., `Python`) should be adopted, since it provides the means to increase maintainability on the long run.
Online Casino Gaming
Published: 2024-03-25 19:43:09

Discover the Thrills of Online Casino Gaming! Dive into a world of excitement and opportunity at [https://bestcasinosonlines.com/onlinecasinos/](https://bestcasinosonlines.com/onlinecasinos/) From thrilling slots to classic table games, there's something for every player. Join now to experience top-notch graphics, immersive gameplay, and lucrative bonuses. Don't miss out on the ultimate entertainment destination – your jackpot awaits!
Astrolinkt - Link in Bio Template using Astro, React & TailwindCSS
Tags: astro, react, tailwindcss, template
Published: 2024-03-25 19:38:11

Introducing the Astrolinkt Link in Bio Template!

Are you looking to showcase your useful links in a visually appealing and interactive way? Look no further than the Astrolinkt Link in Bio Template. Built with Astro, React and TailwindCSS.

Features
- Component-based.
- Interactive Components.
- Handpicked Icons Library.
- Fully Customizable.
- Typescript.
- Minimal Integration.

Explore the Astrolinkt Link in Bio Template on [GitHub](https://github.com/flamrdevs/astrolinkt) and take your links to the next level. If you find this template helpful, consider supporting the project with a donation.

[Buy Me A Coffee](https://www.buymeacoffee.com/flamrdevs)

Start building your professional link in bio today with Astrolinkt. Happy coding!
ODI - A Journey - DAY 1
Published: 2024-03-25 19:31:22

## REPOSITORY

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xbz8vbzsewgaaf4s74sz.png)

1. WORK
2. MASTER

- Work is always attached to Master. one to one relation.
- Master to work is One to Many.

Agent --> Once the Job needs to be executed , this agent will go from the Designer to Scheduler by the agent , and agent will ask details of the job from the Repo ( get the META DATA ) and then give to the Operator.

## STUDIO PANEL

1. Designer
2. Operator
3. Security
4. Topology

## STUDIO

**_<u>TOPOLOGY</u>_**

> **Physical Architecture**

1. How the Work Repository gets created at first ?
2. JDBC connection is made to connect the Master and Work Repo.
3. 40+ Technologies are used to get the Meta Data / Schema Eg. Oracle DB , File , etc
4. If I have Oracle DB , then in TOPOLOGY add the the DB - here always referred to DATASERVER.
5. For Eg., SOURCE & TARGET
SCOTT --> This is the Table --> which as DATA --> connect in the DATARERVER in TOPOGOLY ( Physical Architecture )
6. Data Server always as replacement for Target or Source.
7. Once loaded , create a PHYSICAL SCHEMA.
8. In Physical Schema , what is the difference between Schema and Work Schema ? Is it like Individual Schema you are trying to connect is referred as SCHEMA ? where this is WORK SCHEMA stored ?
9. Data Server is nothing but YOU ARE SAYING , you have been connected to one ORACLE DB.
10. WORK TABLE PREFIX --> this will help to identify where it failed and we can check the error in DB by using the PREFIX.
11. Why $ is specified in those ?
12. New Physical Schema is created under the DATASERVER.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kguirleotcfzaufmy9i2.png)

> **CONTEXT**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2gmc2gnxoopqfcbdjtqp.png)

> **Logical Architecture**

1. Click ORACLE , it will show only to create LOGICAL SCHEMA.
2. MAP the Logical Schema with the Physical Schema which is created against the GLOBAL CONTEXT. This Physical Schema name is " Complete Name " give to the PHYSICAL, not the schema and work schema.
3. Below SS will show the connection of Physical & Logical Relation.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oc8a45tdotciikdkhu26.png)

Therefor , hereafter LOGICAL schema will be referred in the DESIGNER tab. **_NO NEED TO TOUCH PHYSICAL SCHEMA_**.

# Questions

1. whether all PROD , DEV & UAT will have only one Master Repo?
2. W1 To M1 But W1 To M2 is not possible.

# Important Commands

1. select * from v$instance; --> This will give the DB version.
Astrovehnt - Bento Portfolio Template using Astro, React & TailwindCSS
Tags: astro, react, tailwindcss, template
Published: 2024-03-25 19:23:30

Introducing the Astrovehnt Bento Portfolio Template!

Are you looking to showcase your projects in a visually appealing and interactive way? Look no further than the Astrovehnt Bento Portfolio Template. Built with Astro, React and TailwindCSS.

Features
- Component-based.
- Interactive Components.
- Handpicked Icons Library.
- Fully Customizable.
- Typescript.
- Minimal Integration.

Explore the Astrovehnt Bento Portfolio Template on [GitHub](https://github.com/flamrdevs/astrovehnt) and take your portfolio to the next level. If you find this template helpful, consider supporting the project with a donation.

[Buy Me A Coffee](https://www.buymeacoffee.com/flamrdevs)

Start building your professional bento portfolio today with Astrovehnt. Happy coding!
My 'Quote-O-Matic' program has hit a snag
Tags: javascript, reactnative, learning, help
Published: 2024-03-25 19:21:54

I have a problem.

A few days ago, I started working on a little program for React-Native I called "Quote-O-Matic". It's simple enough; the user pushes a button, and the program would display a random inspirational quote from the program's JSON file. 

At first, it went smoothly. With a day, I got the quote-selection code working perfectly. I pushed the button, and a random quote would show up on the console. Problem is, I don't know how to display them to the user. Everytime I push a button, the screen remains quoteless. 

Any words of advice?
Responsible AI dashboard hands-on MS Learn module is now available!
Published: 2024-03-25 19:12:58

Did you know that AI models can be biased? Data scientists, AI developers and organizations understand the importance of responsible AI, however the challenges they face are finding the right tools to help them identify, debug, and mitigate erroneous behavior from AI models. 

Researchers, organizations, open-source community, and Microsoft have been instrumental in developing tools and services to empower AI developers.  Traditional machine learning model performance metrics are based on aggregate calculations, which are not sufficient in pinpointing AI issues that are human-centric. For example, mitigating issues such as unfairness in employment, loan approvals or medical diagnoses using AI Systems that could have negative impact on people, society or human-rights.

👩🏽‍💻Join the **#MarchResponsibly** challenge and enhance you AI debugging skills with #MSLearn's new FREE hands-on module on Responsible AI dashboard!

💡Check out the mind-blowing features and capabilities:

{% youtube G-nBfBNvtg4 %}

👉🏽 Get startup and share your completion badge everyone: https://aka.ms/march-rai/lresponsible-rai-dashboard


🎉Happy Learning! :)
Certification4Exams Victory: Insider Techniques
Published: 2024-03-25 18:12:22

Introduction
<a href="https://certification4exams.com/">certification4exams</a> world of technology, proficiency in Microsoft Office applications is a key skill for professionals across various industries. The CERTIFICATION4EXAMS  exam, also known as Microsoft Office Specialist Excel Expert (Excel and Excel 2019), is designed to validate individuals.

advanced skills in Excel. Achieving excellence in this exam can significantly enhance your career prospects and demonstrate your proficiency in leveraging Excel for complex data analysis and decision-making. One controversial method that some individuals employ to prepare for exams like CERTIFICATION4EXAMS  is the use of —collections of questions and answers from previous exams. In this article, we'll explore the potential benefits and drawbacks of using CERTIFICATION4EXAMS   and provide insights on how to use them responsibly for exam preparation.

Understanding CERTIFICATION4EXAMS 
Before delving into the debate surrounding , it's essential to understand the <a href="https://certification4exams.com/">certification 4exams</a> itself. The Microsoft Office Specialist Excel Expert certification is targeted at individuals who possess advanced skills in Excel.

 The exam evaluates candidates on their ability to manage and organize data, create advanced formulas, perform data analysis, and present information visually. Excel Experts are expected to demonstrate a deep understanding of the application's features and functionality.

Benefits of CERTIFICATION4EXAMS  
Familiarization with Exam Format  can provide a glimpse into the format and structure of the CERTIFICATION4EXAMS  exam. By going through practice questions, candidates can become more familiar with the types of questions that may appear and the time constraints they will face.

 click here more info : https://certification4exams.com/
Self introduction
Tags: frontendchallenge, devchallenge
Published: 2024-03-25 18:08:35


_This is a submission for DEV Challenge v24.03.20, CSS Art: Favorite Snack._

## Inspiration 
**I'm putting forward my presentation here, which actually reflects my experience in the world of work, while fully assuming my human nature.**

## Demo


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/boubsh8nc7dcmjwpe6eq.jpeg)

lien:[https://tronkad.github.io/Art_CSS/]
code:[https://github.com/TronkaD/Art_CSS.git]

## Journey
**For this project, I had to create various shapes using CSS. In this task, I had to master the importance of the position property to use the Z-index, without neglecting the importance of the flexbox. This job may seem easy, but it's during development that you realize just how complex it is.**

Author: TronkaD




<!-- Thanks for participating! -->
Self introduction
Tags: frontendchallenge, devchallenge
Published: 2024-03-25 18:07:19


_This is a submission for DEV Challenge v24.03.20, CSS Art: Favorite Snack._

## Inspiration 
**I'm putting forward my presentation here, which actually reflects my experience in the world of work, while fully assuming my human nature.**

## Demo


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/boubsh8nc7dcmjwpe6eq.jpeg)

lien:[](https://tronkad.github.io/Art_CSS/)
code:[](https://github.com/TronkaD/Art_CSS.git)

## Journey
**For this project, I had to create various shapes using CSS. In this task, I had to master the importance of the position property to use the Z-index, without neglecting the importance of the flexbox. This job may seem easy, but it's during development that you realize just how complex it is.**

Author: TronkaD




<!-- Thanks for participating! -->