Skip to content

Commit

Permalink
ICU-22921 New lines for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
echeran committed Jan 15, 2025
1 parent dca21b8 commit 232e7c0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/userguide/format_parse/messages/try-mf2.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ License & terms of use: http://www.unicode.org/copyright.html
```
1. Build your application and run it
```sh
g++ hello_mf2.cpp -I$DESTDIR/usr/local/include -std=c++17 -L$DESTDIR/usr/local/lib -licuuc -licudata -licui18n
Expand Down Expand Up @@ -296,6 +297,7 @@ know how to create a project in your favorite IDE, and so on.
### Instructions
1. Create a new Maven project
```sh
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=hello_icu_mf2 -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.5 -DinteractiveMode=false
Expand All @@ -322,6 +324,7 @@ know how to create a project in your favorite IDE, and so on.
**Warning:** make sure it is done in `dependencies`, not in `dependencyManagement / dependencies`
1. Edit the `src/test/java/com/mycompany/app/AppTest.java` file
1. Add a new test method
```java
@Test
Expand All @@ -333,14 +336,15 @@ know how to create a project in your favorite IDE, and so on.
Calendar cal = Calendar.getInstance();
cal.set(2025, 0, 28);
Map<String, Object> arguments = new HashMap<>();
arguments.put("user", "John");
arguments.put("now", cal);
System.out.println(mf2.formatToString(arguments));
}
```
1. Add imports
```java
import java.util.HashMap;
import java.util.Locale;
Expand All @@ -350,6 +354,7 @@ know how to create a project in your favorite IDE, and so on.
```
1. Now run the tests
```sh
mvn package -q
```
Expand Down

0 comments on commit 232e7c0

Please sign in to comment.