Qodana and IntelliJ IDEA: How a Code Quality Platform Streamlined the Localization of an IDE
Tags: bestpractices, codereview, collaboration, idea
Published: 2023-01-23 11:59:28

---
title: Qodana and IntelliJ IDEA: How a Code Quality Platform Streamlined the Localization of an IDE
published: true
date: 2023-01-23 10:33:23 UTC
tags: bestpractices,codereview,collaboration,idea
canonical_url: https://blog.jetbrains.com/qodana/2023/01/qodana-and-intellij-idea-how-a-code-quality-platform-streamlined-the-localization-of-an-ide/
---

Have you ever wondered how to make sure that your determination to live a healthier life, not sweat the small stuff, and work smarter, not harder continues past Valentine’s Day? Psychologists say that breaking big goals into small steps is the best way to stick to your New Year’s resolutions.

This advice applies to programmers’ resolutions too. If you plan a large project that involves code refactoring, you may want to see the full picture of the required changes and plan accordingly. This is exactly what the IntelliJ team did when they needed to localize the IDE’s entire UI into Chinese, Japanese, and Korean.

Using Qodana, the code quality platform from JetBrains, as a single source of truth for their localization process, the IntelliJ team managed to finish the project much faster than expected. This positive outcome was a result of wise planning, accountability, and oversight. Here’s how they did it.

![](https://blog.jetbrains.com/wp-content/uploads/2023/01/Blog_Featured_image_1280x600-1-1.png)

[TRY QODANA FOR FREE](https://www.jetbrains.com/qodana "TRY QODANA FOR FREE")

### The challenge: isolate 13,000 hard-coded strings and monitor progress effectively

To streamline the localization of their UI into 3 different languages, the IntelliJ team needed to strip out all localizable items from the source code and put them into separate properties files to be handed over for translation.

With over 13,000 strings, it was easy for some localizable ones to be overlooked, meaning that they remained in the code. When localizing the UI, hard-coded strings can be the most difficult parts to deal with. They are hard to find because they do not show up until the software has been localized. As a result, if a user installed the Japanese language pack, for example, some parts of the UI would still be in English.

The team was therefore left with much tedious and repetitive work. As a result the head of the localization project was looking for a solution that would allow them to:

1. Automate a huge chunk of the work by continuously inspecting the code base for hard-coded string literals.
2. Assign issues to the developers who would be responsible for fixing them.
3. Oversee the extraction of localizable strings.

### The solution: automated code inspection for hard-coded string literals

The localization project lead chose Qodana to streamline the code inspection process, resulting in a project with the following steps:

**#1. Connect Qodana to TeamCity**

The IntelliJ team connected Qodana to their [TeamCity pipeline](https://www.jetbrains.com/help/qodana/teamcity.html) and enabled the [_Internationalization_ code inspection](https://www.jetbrains.com/help/idea/hard-coded-string-literals.html) to highlight hard-coded string literals that were not extracted into properties files as required.

![](https://blog.jetbrains.com/wp-content/uploads/2023/01/Example-string.png)

**#2. Configure the inspection profile**

In the inspection profile, the team [configured the scope of the inspection](https://www.jetbrains.com/help/qodana/qodana-yaml.html#Set+up+a+profile) to make sure that the platform skipped parts like legacy code, literals without alphabetic characters, and strings consisting of only whitespace.

The team also made sure that TeamCity would produce a test report for each line inspected by Qodana and fail it if the string wasn’t extracted.

**#3. Decide on the frequency of scans**

Once fully configured, Qodana was set to inspect the code every 4 hours. It was especially important that the scan was running independently on the server, as opposed to on someone’s local machine. This ultimately saved the team valuable time.

The first Qodana run resulted in 10,000 failed tests in TeamCity.

![](https://lh6.googleusercontent.com/5xWCo4xt5mc1D8v5e_hbZ25hqF7-dI3Lwv4NytD00ddmXqd3unw39POav523WjOCCRiLCDKQq6cOS4RfcGgSFFqQ-X_0XCPA1yxVvRD5y6Dj9Qlu6UFUxhySnPZZqx-XtfJwanN7ginGIT4Tv-fuOWBXo0lBCFFTY4wq0UPBbcFkElIQ6n3klU0O4qM-5A)
_Overview of the failed tests._

![](https://lh5.googleusercontent.com/S-xGTPMyOu-zL-Ghz5Ndo8kQXVLSPvYXUYpyBIwNsfwtpRNLv2vlaN0FX-BiShb422gjiNYc0wFU3wPZcSceog4Ke7Ati8m-Jmx6_RWCbW7YAbtcEwg2dc2cem_mHfATcAo2DbLfQOz93meA9YFDmshdQKjQakys_vEHRpBLAUyHmufBBgqbJK7dkHPXnQ)
_Qodana flags the hard-coded string literal remaining in the code as an error in the internationalized environment._

**#4. Assign tasks**

For each of the test failures, the project lead assigned a developer to investigate and extract the hard-coded string to the properties file.

![](https://lh5.googleusercontent.com/Rx5p2vnkFYKL3FEF4IttKzGgE_tnAPbLX9CmFaP20U1wXgN57ramrBJvRrkxQiGIagRx5ETZl7ztDO05l6No7HK4i8hr_crkAdohkw-I_QXSmMLi-wwLdQXelFG2b2lfQu-d2nnI0OmdYUyDxBjfhRoEi-zulqVEoDcc1YvPgCUPtNmm5U7mCUNMYrtOjQ)
_How the assigned test is displayed in TeamCity._

**#5. Monitor the results**

After each Qodana inspection, TeamCity compared the previous results to the current report. If the developer responsible for an issue extracted the string, TeamCity marked the test as fixed. This allowed the project lead to monitor the progress without having to manually mark tests as fixed.

Additionally, the team was able to monitor progress in the Qodana Cloud dashboard, which updated information on the remaining code issues in real time and compared results between different Qodana runs.

![](https://resources.jetbrains.com/storage/products/blog/wp-content/uploads/Qodana/Hoverview.gif)
_The Qodana Cloud dashboard example. _

Qodana also allowed adding selected issues to the baseline, otherwise known as the technical debt section. This way, the entire team could see the same list of issues and monitor progress right in the platform. Below is an example of how this works.

![](https://resources.jetbrains.com/storage/products/blog/wp-content/uploads/Qodana/Ibaseline.gif)
_The Qodana baseline feature._

### The key outcomes

In only a few months, the number of **failed tests dropped from 10,000 to zero** , an average of about **175 fixed tests per day**. The team successfully removed all hard-coded string literals from the source code and the whole UI was localized seamlessly, with no unexpected elements in English.

With Qodana, the IntelliJ team required fewer manual steps in the localization process, thereby reducing the number of human errors and increasing confidence in the localized builds. Additionally, with checks running every 4 hours, they were able to detect issues sooner and prevent small problems from turning into big ones later on.

Finally, Qodana became the single source of truth for the team lead, making it easy to ensure that developers fixed the problems they were assigned.

Thanks to these results, the IntelliJ team will keep using Qodana as a code quality and resource planning platform when they deliver new functionalities or improve IntelliJ IDEA’s performance. More on that in our upcoming posts.

[GET STARTED WITH QODANA](https://www.jetbrains.com/qodana "GET STARTED WITH QODANA")

Happy developing and keep your code clean!