[Git][java-team/libgettext-commons-java][upstream] New upstream version 0.9.8
Andreas Tille (@tille)
gitlab at salsa.debian.org
Tue Feb 4 17:08:19 GMT 2025
Andreas Tille pushed to branch upstream at Debian Java Maintainers / libgettext-commons-java
Commits:
cc1c8e05 by Andreas Tille at 2025-02-04T17:53:11+01:00
New upstream version 0.9.8
- - - - -
26 changed files:
- + .classpath
- + .project
- + .settings/org.eclipse.jdt.core.prefs
- + .settings/org.eclipse.jdt.ui.prefs
- + .settings/org.eclipse.mylyn.tasks.ui.prefs
- ChangeLog
- + po/de.po
- + po/keys.pot
- pom.xml
- src/examples/I18nExample.java
- src/java/org/xnap/commons/i18n/EmptyResourceBundle.java
- src/java/org/xnap/commons/i18n/I18n.java
- src/java/org/xnap/commons/i18n/I18nFactory.java
- src/java/org/xnap/commons/i18n/package.html
- src/test/org/xnap/commons/i18n/I18nCacheTest.java
- src/test/org/xnap/commons/i18n/I18nTest.java
- src/test/org/xnap/commons/i18n/testpackage/MockResourceBundle.java
- src/test/org/xnap/commons/i18n/testpackage/noresources/HasNoOwnResources.java
- src/test/org/xnap/commons/i18n/testpackage/resources/HasItsOwnResources.java
- + xdocs/changes.xml
- + xdocs/gettext-structure.odg
- + xdocs/gettext-structure.png
- + xdocs/index.xml
- + xdocs/maven.xml
- + xdocs/navigation.xml
- + xdocs/tutorial.xml
Changes:
=====================================
.classpath
=====================================
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test-resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.3"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
=====================================
.project
=====================================
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>gettext-commons</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
=====================================
.settings/org.eclipse.jdt.core.prefs
=====================================
@@ -0,0 +1,266 @@
+#Wed Aug 22 11:10:30 EDT 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=52
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=48
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=64
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=64
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=1
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
=====================================
.settings/org.eclipse.jdt.ui.prefs
=====================================
@@ -0,0 +1,5 @@
+#Mon Aug 06 16:07:09 EDT 2007
+eclipse.preferences.version=1
+formatter_profile=_Gettext Commons
+formatter_settings_version=11
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>
=====================================
.settings/org.eclipse.mylyn.tasks.ui.prefs
=====================================
@@ -0,0 +1,4 @@
+#Mon Aug 06 15:59:00 EDT 2007
+eclipse.preferences.version=1
+project.repository.kind=web
+project.repository.url=http\://code.google.com/p/gettext-commons/issues
=====================================
ChangeLog
=====================================
@@ -1,3 +1,8 @@
+2013-03-21 Nicolas Fortin <nicolas.fortin at ec-nantes.fr>
+
+ * pom.xml: Use maven bundle plugin in order to generate META-INF/MANIFEST.MF OSGi file.
+ * Gettext Commons 0.9.7 released
+
2008-04-12 Felix Berger <felixberger at beldesign.de>
* src/java/org/xnap/commons/i18n/I18nCache.java: Fixed
=====================================
po/de.po
=====================================
@@ -0,0 +1,184 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: de\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-02-10 19:33-0500\n"
+"PO-Revision-Date: 2009-02-10 19:36-0500\n"
+"Last-Translator: Steffen Pingel <steffenp at gmx.de>\n"
+"Language-Team: <en at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: KBabel 1.10.2\n"
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:59
+msgid "house"
+msgstr "Haus"
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:60
+msgid "mouse"
+msgstr "Maus"
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:61
+msgid "Automatic"
+msgstr "Automatisch"
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:62
+msgid "Completion"
+msgstr "Ergänzung"
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:67
+#, java-format
+msgid "House Nr. {0} "
+msgstr "Haus Nr. {0}"
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:68
+#, java-format
+msgid "{0}"
+msgstr "{0}"
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:73
+#: src/test/org/xnap/commons/i18n/I18nTest.java:169
+#, java-format
+msgid "Foo {1} {0}"
+msgid_plural "Foos"
+msgstr[0] "Foo {1} {0}"
+msgstr[1] "Foos"
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:74
+#: src/test/org/xnap/commons/i18n/I18nTest.java:170
+#, java-format
+msgid "Foo {0} {1}"
+msgid_plural "Foos"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:79
+#: src/test/org/xnap/commons/i18n/I18nTest.java:175
+#, java-format
+msgid "Foo {1} {2} {0}"
+msgid_plural "Foos"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:80
+#: src/test/org/xnap/commons/i18n/I18nTest.java:176
+#, java-format
+msgid "Foo {0} {1} {2}"
+msgid_plural "Foos"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:85
+#: src/test/org/xnap/commons/i18n/I18nTest.java:182
+#, java-format
+msgid "Foo {1} {2} {3} {0}"
+msgid_plural "Foos"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:86
+#: src/test/org/xnap/commons/i18n/I18nTest.java:184
+#, java-format
+msgid "Foo {0} {1} {2} {3}"
+msgid_plural "Foos"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:91
+#: src/test/org/xnap/commons/i18n/I18nTest.java:151
+#: src/test/org/xnap/commons/i18n/I18nTest.java:152
+#: src/test/org/xnap/commons/i18n/I18nTest.java:153
+#, java-format
+msgid "Foo"
+msgid_plural "{0} Bars"
+msgstr[0] "Foo"
+msgstr[1] "{0} Bars"
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:96
+#: src/test/org/xnap/commons/i18n/I18nTest.java:98
+msgctxt "noun"
+msgid "chat"
+msgstr "Chat"
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:97
+#: src/test/org/xnap/commons/i18n/I18nTest.java:99
+#: src/test/org/xnap/commons/i18n/I18nTest.java:138
+#: src/test/org/xnap/commons/i18n/I18nTest.java:140
+msgctxt "verb"
+msgid "chat"
+msgstr "Chatten"
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:158
+#: src/test/org/xnap/commons/i18n/I18nTest.java:159
+#, java-format
+msgid "File"
+msgid_plural "{0} Files"
+msgstr[0] "Datei"
+msgstr[1] "{0} Dateien"
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:164
+#, java-format
+msgid "Foo {0} "
+msgid_plural "Foos {0}"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:195
+#: src/test/org/xnap/commons/i18n/I18nFactoryTest.java:67
+#: src/test/org/xnap/commons/i18n/I18nFactoryTest.java:75
+#: src/test/org/xnap/commons/i18n/I18nFactoryTest.java:111
+#: src/test/org/xnap/commons/i18n/I18nFactoryTest.java:114
+msgid "value"
+msgstr "Wert"
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:199
+msgctxt "dont translate to German"
+msgid "baobab"
+msgstr ""
+
+#: src/test/org/xnap/commons/i18n/I18nFactoryTest.java:96
+msgid "source"
+msgstr ""
+
+#: src/test/org/xnap/commons/i18n/I18nFactoryTest.java:103
+msgid "own"
+msgstr ""
+
+#: src/examples/I18nExample.java:39
+msgid "This text is marked for translation and is translated"
+msgstr ""
+
+#: src/examples/I18nExample.java:46
+msgid "This text is marked for translation but not translated"
+msgstr ""
+
+#: src/examples/I18nExample.java:62
+#, java-format
+msgid "Four: {0}"
+msgstr ""
+
+#: src/examples/I18nExample.java:70
+msgctxt "chat (verb)"
+msgid "chat"
+msgstr ""
+
+#: src/examples/I18nExample.java:72
+msgctxt "chat (noun)"
+msgid "chat"
+msgstr ""
+
+#: src/examples/I18nExample.java:78 src/examples/I18nExample.java:80
+#, java-format
+msgid "{0} file is open"
+msgid_plural "{0} files are open"
+msgstr[0] ""
+msgstr[1] ""
+
+#~ msgid "Foo (context)"
+#~ msgstr "KontextFoo"
=====================================
po/keys.pot
=====================================
@@ -0,0 +1,182 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-02-10 19:33-0500\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:59
+msgid "house"
+msgstr ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:60
+msgid "mouse"
+msgstr ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:61
+msgid "Automatic"
+msgstr ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:62
+msgid "Completion"
+msgstr ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:67
+#, java-format
+msgid "House Nr. {0} "
+msgstr ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:68
+#, java-format
+msgid "{0}"
+msgstr ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:73
+#: src/test/org/xnap/commons/i18n/I18nTest.java:169
+#, java-format
+msgid "Foo {1} {0}"
+msgid_plural "Foos"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:74
+#: src/test/org/xnap/commons/i18n/I18nTest.java:170
+#, java-format
+msgid "Foo {0} {1}"
+msgid_plural "Foos"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:79
+#: src/test/org/xnap/commons/i18n/I18nTest.java:175
+#, java-format
+msgid "Foo {1} {2} {0}"
+msgid_plural "Foos"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:80
+#: src/test/org/xnap/commons/i18n/I18nTest.java:176
+#, java-format
+msgid "Foo {0} {1} {2}"
+msgid_plural "Foos"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:85
+#: src/test/org/xnap/commons/i18n/I18nTest.java:182
+#, java-format
+msgid "Foo {1} {2} {3} {0}"
+msgid_plural "Foos"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:86
+#: src/test/org/xnap/commons/i18n/I18nTest.java:184
+#, java-format
+msgid "Foo {0} {1} {2} {3}"
+msgid_plural "Foos"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:91
+#: src/test/org/xnap/commons/i18n/I18nTest.java:151
+#: src/test/org/xnap/commons/i18n/I18nTest.java:152
+#: src/test/org/xnap/commons/i18n/I18nTest.java:153
+#, java-format
+msgid "Foo"
+msgid_plural "{0} Bars"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:96
+#: src/test/org/xnap/commons/i18n/I18nTest.java:98
+msgctxt "noun"
+msgid "chat"
+msgstr ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:97
+#: src/test/org/xnap/commons/i18n/I18nTest.java:99
+#: src/test/org/xnap/commons/i18n/I18nTest.java:138
+#: src/test/org/xnap/commons/i18n/I18nTest.java:140
+msgctxt "verb"
+msgid "chat"
+msgstr ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:158
+#: src/test/org/xnap/commons/i18n/I18nTest.java:159
+#, java-format
+msgid "File"
+msgid_plural "{0} Files"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:164
+#, java-format
+msgid "Foo {0} "
+msgid_plural "Foos {0}"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:195
+#: src/test/org/xnap/commons/i18n/I18nFactoryTest.java:67
+#: src/test/org/xnap/commons/i18n/I18nFactoryTest.java:75
+#: src/test/org/xnap/commons/i18n/I18nFactoryTest.java:111
+#: src/test/org/xnap/commons/i18n/I18nFactoryTest.java:114
+msgid "value"
+msgstr ""
+
+#: src/test/org/xnap/commons/i18n/I18nTest.java:199
+msgctxt "dont translate to German"
+msgid "baobab"
+msgstr ""
+
+#: src/test/org/xnap/commons/i18n/I18nFactoryTest.java:96
+msgid "source"
+msgstr ""
+
+#: src/test/org/xnap/commons/i18n/I18nFactoryTest.java:103
+msgid "own"
+msgstr ""
+
+#: src/examples/I18nExample.java:39
+msgid "This text is marked for translation and is translated"
+msgstr ""
+
+#: src/examples/I18nExample.java:46
+msgid "This text is marked for translation but not translated"
+msgstr ""
+
+#: src/examples/I18nExample.java:62
+#, java-format
+msgid "Four: {0}"
+msgstr ""
+
+#: src/examples/I18nExample.java:70
+msgctxt "chat (verb)"
+msgid "chat"
+msgstr ""
+
+#: src/examples/I18nExample.java:72
+msgctxt "chat (noun)"
+msgid "chat"
+msgstr ""
+
+#: src/examples/I18nExample.java:78 src/examples/I18nExample.java:80
+#, java-format
+msgid "{0} file is open"
+msgid_plural "{0} files are open"
+msgstr[0] ""
+msgstr[1] ""
=====================================
pom.xml
=====================================
@@ -1,110 +1,153 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.xnap.commons</groupId>
- <artifactId>gettext-commons</artifactId>
- <packaging>jar</packaging>
- <version>0.9.6</version>
- <name>Gettext Commons</name>
- <url>http://code.google.com/p/gettext-commons/</url>
- <description>
- A library that supports gettext-based internationalization
- (i18n) of Java applications.
- </description>
- <developers>
- <developer>
- <name>Felix Berger</name>
- <id>bergerfx</id>
- <roles>
- <role>Developer</role>
- </roles>
- <url>http://www.felix.beldesign.de/</url>
- </developer>
- <developer>
- <name>Tammo van Lessen</name>
- <id>tvanlessen</id>
- <roles>
- <role>Developer</role>
- </roles>
- <url>http://taval.de/</url>
- </developer>
- <developer>
- <name>Steffen Pingel</name>
- <id>steffen.pingel</id>
- <roles>
- <role>Project Manager</role>
- <role>Developer</role>
- </roles>
- <url>http://steffenpingel.de</url>
- </developer>
- </developers>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <scm>
- <connection>
- scm:svn:http://gettext-commons.googlecode.com/svn/trunk
- </connection>
- <developerConnection>
- scm:cvs:https://gettext-commons.googlecode.com/svn/trunk
- </developerConnection>
- <url>http://gettext-commons.googlecode.com/svn/trunk</url>
- </scm>
- <build>
- <sourceDirectory>src/java</sourceDirectory>
- <testSourceDirectory>src/test</testSourceDirectory>
- <resources>
- <resource>
- <directory>src/conf</directory>
- </resource>
- </resources>
- <testResources>
- <testResource>
- <directory>src/test-resources</directory>
- </testResource>
- </testResources>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.4</source>
- <target>1.4</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-eclipse-plugin</artifactId>
- <configuration>
- <projectnatures>
- <java.lang.String>
- org.eclipse.jdt.core.javanature
- </java.lang.String>
- </projectnatures>
- <buildcommands>
- <java.lang.String>
- org.eclipse.jdt.core.javabuilder
- </java.lang.String>
- </buildcommands>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <testFailureIgnore>true</testFailureIgnore>
- </configuration>
- </plugin>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.googlecode.gettext-commons</groupId>
+ <artifactId>gettext-commons</artifactId>
+ <packaging>jar</packaging>
+ <version>0.9.8</version>
+ <name>Gettext Commons</name>
+ <url>http://code.google.com/p/gettext-commons/</url>
+ <description>
+ A library that supports gettext-based internationalization
+ (i18n) of Java applications.
+ </description>
+ <licenses>
+ <license>
+ <name>GNU Library or Lesser General Public License (LGPL)</name>
+ <url>http://www.gnu.org/licenses/lgpl.html</url>
+ </license>
+ </licenses>
+ <developers>
+ <developer>
+ <name>Felix Berger</name>
+ <id>bergerfx</id>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ <url>http://www.felix.beldesign.de/</url>
+ </developer>
+ <developer>
+ <name>Tammo van Lessen</name>
+ <id>tvanlessen</id>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ <url>http://taval.de/</url>
+ </developer>
+ <developer>
+ <name>Steffen Pingel</name>
+ <id>steffen.pingel</id>
+ <roles>
+ <role>Project Manager</role>
+ <role>Developer</role>
+ </roles>
+ <url>http://steffenpingel.de</url>
+ </developer>
+ <developer>
+ <name>Nicolas Fortin</name>
+ <id>nicolas-f</id>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ <url>http://www.orbisgis.org</url>
+ </developer>
+ </developers>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <scm>
+ <connection>
+ scm:svn:http://gettext-commons.googlecode.com/svn/tags/gettext-commons-0_9_8
+ </connection>
+ <developerConnection>
+ scm:svn:https://gettext-commons.googlecode.com/svn/tags/gettext-commons-0_9_8
+ </developerConnection>
+ <url>http://gettext-commons.googlecode.com/svn/tags/gettext-commons-0_9_8</url>
+ </scm>
+ <build>
+ <sourceDirectory>src/java</sourceDirectory>
+ <testSourceDirectory>src/test</testSourceDirectory>
+ <resources>
+ <resource>
+ <directory>src/conf</directory>
+ </resource>
+ </resources>
+ <testResources>
+ <testResource>
+ <directory>src/test-resources</directory>
+ </testResource>
+ </testResources>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.4</source>
+ <target>1.4</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <configuration>
+ <projectnatures>
+ <java.lang.String>
+ org.eclipse.jdt.core.javanature
+ </java.lang.String>
+ </projectnatures>
+ <buildcommands>
+ <java.lang.String>
+ org.eclipse.jdt.core.javabuilder
+ </java.lang.String>
+ </buildcommands>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.14</version>
+ <configuration>
+ <testFailureIgnore>true</testFailureIgnore>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>2.3.7</version>
+ <executions>
+ <execution>
+ <id>bundle-manifest</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>manifest</goal>
+ </goals>
+ </execution>
+ </executions>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Export-Package>org.xnap.commons.i18n</Export-Package>
+ <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+ </instructions>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <archive>
+ <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+ </archive>
+ </configuration>
+ </plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
@@ -123,47 +166,29 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>com.googlecode.gettext-commons</groupId>
+ <artifactId>gettext-maven-plugin</artifactId>
+ <version>1.2.4</version>
+ <executions>
+ <execution>
+ <id>convert-po-class</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>dist</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <sourceDirectory>src/test</sourceDirectory>
+ <targetBundle>
+ org.xnap.commons.i18n.Messages
+ </targetBundle>
+ <poDirectory>${basedir}/po</poDirectory>
+ <outputDirectory>${build.testOutputDirectory}</outputDirectory>
+ </configuration>
+ </plugin>
- </plugins>
- </build>
- <distributionManagement>
- <site>
- <id>xnap-commons</id>
- <name>XNap Commons Site</name>
- <url>
- scp://shell.sf.net//home/groups/x/xn/xnap-commons/htdocs/gettext-commons/
- </url>
- </site>
- <repository>
- <id>xnap-commons</id>
- <name>XNap Commons Repository</name>
- <url>
- scp://shell.sf.net//home/groups/x/xn/xnap-commons/htdocs/repository
- </url>
- </repository>
- </distributionManagement>
- <reporting>
- <plugins>
- <!--
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>changes-maven-plugin</artifactId>
- <configuration>
- <xmlPath>xdocs/changes.xml</xmlPath>
- </configuration>
- </plugin>
- -->
- <plugin>
- <groupId>org.xnap.commons</groupId>
- <artifactId>maven-gettext-plugin</artifactId>
- <configuration>
- <poDirectory>po</poDirectory>
- <targetBundle>
- org.xnap.commons.i18n.Messages
- </targetBundle>
- <poDirectory>${basedir}/po</poDirectory>
- </configuration>
- </plugin>
- </plugins>
- </reporting>
+ </plugins>
+ </build>
</project>
=====================================
src/examples/I18nExample.java
=====================================
@@ -1,3 +1,23 @@
+/*
+ * Gettext Commons
+ *
+ * Copyright (C) 2005 Felix Berger
+ * Copyright (C) 2005 Steffen Pingel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
import java.util.Locale;
import org.xnap.commons.i18n.I18n;
import org.xnap.commons.i18n.I18nFactory;
=====================================
src/java/org/xnap/commons/i18n/EmptyResourceBundle.java
=====================================
@@ -1,3 +1,23 @@
+/*
+ * Gettext Commons
+ *
+ * Copyright (C) 2005 Felix Berger
+ * Copyright (C) 2005 Steffen Pingel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
package org.xnap.commons.i18n;
import java.util.Enumeration;
=====================================
src/java/org/xnap/commons/i18n/I18n.java
=====================================
@@ -480,8 +480,9 @@ public class I18n {
* @param text
* the ambiguous key message in the source locale
* @return <code>text</code> if the locale of the underlying resource
- * bundle equals the source code locale, the translation of
- * <code>comment</code> otherwise.
+ * bundle equals the source code locale, the disambiguated
+ * translation of <code>text</code> otherwise
+ *
* @see #setSourceCodeLocale(Locale)
* @since 0.9
*/
@@ -503,7 +504,7 @@ public class I18n {
*
* @param context
* the context of the message to disambiguate it when translating
- * @param text
+ * @param singularText
* the key string to be translated.
* @param pluralText
* the plural form of <code>text</code>.
@@ -527,7 +528,7 @@ public class I18n {
*
* @param context
* the context of the message to disambiguate it when translating
- * @param text
+ * @param singularText
* the key string to be translated.
* @param pluralText
* the plural form of <code>text</code>.
@@ -544,7 +545,7 @@ public class I18n {
/**
* Overloaded method that invokes
- * {@link #trnc(String, String, String, long, Object[]) passing <code>obj</code>
+ * {@link #trnc(String, String, String, long, Object[])} passing <code>obj</code>
* arguments as an array.
*
* @since 0.9.5
@@ -555,7 +556,7 @@ public class I18n {
/**
* Overloaded method that invokes
- * {@link #trnc(String, String, String, long, Object[]) passing <code>obj1</code> and <code>obj2</code>
+ * {@link #trnc(String, String, String, long, Object[])} passing <code>obj1</code> and <code>obj2</code>
* arguments as an array.
*
* @since 0.9.5
@@ -566,7 +567,7 @@ public class I18n {
/**
* Overloaded method that invokes
- * {@link #trnc(String, String, String, long, Object[]) passing <code>obj1</code>, <code>obj2</code> and <code>obj3</code>
+ * {@link #trnc(String, String, String, long, Object[])} passing <code>obj1</code>, <code>obj2</code> and <code>obj3</code>
* arguments as an array.
*
* @since 0.9.5
@@ -577,7 +578,7 @@ public class I18n {
/**
* Overloaded method that invokes
- * {@link #trnc(String, String, String, long, Object[]) passing <code>obj1</code>, <code>obj2</code>, <code>obj3</code> and <code>obj4</code>
+ * {@link #trnc(String, String, String, long, Object[])} passing <code>obj1</code>, <code>obj2</code>, <code>obj3</code> and <code>obj4</code>
* arguments as an array.
*
* @since 0.9.5
=====================================
src/java/org/xnap/commons/i18n/I18nFactory.java
=====================================
@@ -146,8 +146,6 @@ public class I18nFactory {
* @param clazz
* the package hierarchy of the clazz and its class loader are
* used for resolving and loading the resource bundle
- * @param baseName
- * the name of the underlying resource bundle
* @param locale
* the locale of the underlying resource bundle
* @param flags
=====================================
src/java/org/xnap/commons/i18n/package.html
=====================================
@@ -6,8 +6,7 @@
<p>Provides classes for internationalization (i18n).</p>
<p>To learn how to make use of the Gettext Commons internationalization,
-please have a look at this <a href="
-http://xnap-commons.sourceforge.net/gettext-commons/tutorial.html">tutorial</a>.</p>
+please have a look at this <a href="http://code.google.com/p/gettext-commons/wiki/Tutorial">tutorial</a>.</p>
</body>
</html>
=====================================
src/test/org/xnap/commons/i18n/I18nCacheTest.java
=====================================
@@ -38,9 +38,9 @@ public class I18nCacheTest extends TestCase {
assertNull(cache.get("foo", Locale.getDefault()));
try {
cache.get("foo", null);
- fail("Expected IllegalArgumentException");
+ fail("Expected NullPointerException");
}
- catch (IllegalArgumentException expected) {}
+ catch (NullPointerException expected) {}
i18n.setLocale(Locale.ENGLISH);
assertSame(i18n, cache.get("foo", Locale.ENGLISH));
}
=====================================
src/test/org/xnap/commons/i18n/I18nTest.java
=====================================
@@ -64,7 +64,7 @@ public class I18nTest extends TestCase {
public void testTr1()
{
- assertEquals("House Nr. 2 ", i18nEN.tr("House Nr. {0} ", Integer.valueOf(2)));
+ assertEquals("House Nr. 2 ", i18nEN.tr("House Nr. {0} ", new Integer(2)));
assertEquals("0", i18nEN.tr("{0}", "0"));
}
=====================================
src/test/org/xnap/commons/i18n/testpackage/MockResourceBundle.java
=====================================
@@ -1,3 +1,23 @@
+/*
+ * Gettext Commons
+ *
+ * Copyright (C) 2005 Felix Berger
+ * Copyright (C) 2005 Steffen Pingel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
package org.xnap.commons.i18n.testpackage;
import java.util.Enumeration;
=====================================
src/test/org/xnap/commons/i18n/testpackage/noresources/HasNoOwnResources.java
=====================================
@@ -1,3 +1,23 @@
+/*
+ * Gettext Commons
+ *
+ * Copyright (C) 2005 Felix Berger
+ * Copyright (C) 2005 Steffen Pingel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
package org.xnap.commons.i18n.testpackage.noresources;
public class HasNoOwnResources
=====================================
src/test/org/xnap/commons/i18n/testpackage/resources/HasItsOwnResources.java
=====================================
@@ -1,3 +1,23 @@
+/*
+ * Gettext Commons
+ *
+ * Copyright (C) 2005 Felix Berger
+ * Copyright (C) 2005 Steffen Pingel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
package org.xnap.commons.i18n.testpackage.resources;
public class HasItsOwnResources
=====================================
xdocs/changes.xml
=====================================
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<document>
+ <properties>
+ <title>Changes</title>
+ </properties>
+ <body>
+ <release version="0.9.1" date="2007-08-22">
+ <action dev="steffen.pingel" type="update">
+ The project has been separated from the XNap Commons project
+ and moved to a new location:
+ http://code.google.com/p/gettext-commons/
+ </action>
+ <action dev="steffen.pingel" type="add">
+ A locale parameter has been added to I18nFactory.getI18n()
+ (#1).
+ </action>
+ <action dev="steffen.pingel" type="update">
+ A flags parameter has been added to I18nFactory.getI18n() that
+ allows to fallback to a default resource bundle (#3) or to
+ disable caching.
+ </action>
+ <action dev="steffen.pingel" type="update">
+ The resource bundle lookup has been enhanced to also look in
+ the default package when a class is passed to
+ I18nFactory.getI18n() that is not in the default package (#2).
+ </action>
+ <action dev="steffen.pingel" type="update">
+ If a basename is passed to I18nFactory.getI18n() the classpath
+ is not searched for i18n.properties files anymore (#7)
+ </action>
+ <action dev="steffen.pingel" type="update">
+ I18nManager.setDefaultLocale() does not invoke
+ Locale.setDefault() anymore (#6).
+ </action>
+ <action dev="steffen.pingel" type="fix">
+ A NullPointerException has been fixed classes that were loaded
+ through the boot strap classloader were passed to
+ I18nFactory.getI18n() (#4).
+ </action>
+ </release>
+ <release version="0.9" date="2006-01-05">
+ <action dev="squig" type="add">
+ Initial release. The project was formerly part of the XNap
+ Commons and is now distributed separately. The changes
+ described for this release were made since XNap Commons
+ 0.9.3 which was the last XNap Commons release that contained
+ gettext classes.
+ </action>
+ </release>
+ </body>
+</document>
+
+<!--
+Local Variables:
+sgml-indent-data: t
+End:
+-->
=====================================
xdocs/gettext-structure.odg
=====================================
Binary files /dev/null and b/xdocs/gettext-structure.odg differ
=====================================
xdocs/gettext-structure.png
=====================================
Binary files /dev/null and b/xdocs/gettext-structure.png differ
=====================================
xdocs/index.xml
=====================================
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+
+<document>
+ <properties>
+ <title>Gettext Commons</title>
+ </properties>
+ <body>
+ <section name="Introduction">
+ <p>The Gettext Commons project provides Java classes for
+ internationalization (i18n) through <a
+ href="http://www.gnu.org/software/gettext/">GNU gettext</a>.</p>
+
+ <p>See
+ the <a href="http://code.google.com/p/gettext-commons/">project
+ page</a> for more information and downloads.</p>
+ </section>
+ </body>
+</document>
+
+<!--
+Local Variables:
+sgml-indent-data: t
+End:
+-->
=====================================
xdocs/maven.xml
=====================================
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+
+<document>
+ <properties>
+ <title>Gettext Commons</title>
+ </properties>
+ <body>
+ <section name="Maven Repository">
+ <p>We maintain a repository that can be used for automated
+ dependency downloading with Maven.</p>
+ </section>
+
+ <section name="Maven 2.x">
+ <p>If you are using <a href="http://maven.apache.org/"
+ target="_blank">Maven 2.x</a> add the following sections to your
+ pom.xml:</p>
+
+<source>
+...
+<dependencies>
+ <dependency>
+ <groupId>org.xnap.commons</groupId>
+ <artifactId>gettext-commons</artifactId>
+ <version>0.9.6</version>
+ </dependency>
+</dependencies>
+...
+<repositories>
+ <repository>
+ <id>gettext-commons-site</id>
+ <url>http://gettext-commons.googlecode.com/svn/maven-repository/</url>
+ </repository>
+</repositories>
+...
+</source>
+ </section>
+
+ <section name="Maven 1.x">
+ <p>If you are using <a href="http://maven.apache.org/maven-1.x/"
+ target="_blank">Maven 1.x</a> add the following dependencies to
+ your project.xml:</p>
+
+<source>
+...
+<dependencies>
+ <dependency>
+ <groupId>xnap-commons</groupId>
+ <artifactId>gettext-commons</artifactId>
+ <version>0.9.1</version>
+ <url>http://xnap-commons.sf.net/gettext-commons/</url>
+ </dependency>
+</dependencies>
+...
+</source>
+
+ <p>And add the XNap Commons repository to your
+ project.properties:</p>
+
+<source>
+maven.repo.remote = http://www.ibiblio.org/maven,http://xnap-commons.sf.net/repository
+</source>
+
+ </section>
+ </body>
+</document>
+
+<!--
+Local Variables:
+sgml-indent-data: t
+End:
+-->
=====================================
xdocs/navigation.xml
=====================================
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="Package Manager">
+ <title>Gettext Commons</title>
+ <body>
+ <links>
+ <item name="Project Page"
+ href="http://code.google.com/p/gettext-commons/"/>
+ </links>
+ <menu name="Overview">
+ <item href="/index.html" name="Home"/>
+ <item name="Download" href="http://code.google.com/p/gettext-commons/downloads/list"/>
+ <item href="/maven.html" name="Maven Repository"/>
+ <item href="http://code.google.com/p/gettext-commons/wiki/Tutorial" name="Tutorial"/>
+ <item name="API (JavaDoc)" href="/apidocs/index.html" target="_blank"/>
+ </menu>
+ </body>
+</project>
=====================================
xdocs/tutorial.xml
=====================================
@@ -0,0 +1,220 @@
+<?xml version="1.0"?>
+
+<document>
+ <properties>
+ <title>Tutorial</title>
+ </properties>
+ <body>
+ <section name="Overview">
+
+ <p>This page gives an overview of the Gettext Commons and
+ describes how to integrate the library into existing Java
+ applications.</p>
+
+ <p>Quick Links: <a
+ href="examples/I18nExample.java">I18nExample.java</a>, <a
+ href="/gettext-commons/apidocs/index.html">API
+ Documentation</a></p>
+ </section>
+
+ <section name="Table of Contents">
+ <ol>
+ <li><a href="#Requirements">Requirements</a></li>
+ <li><a href="#Installation">Installation</a></li>
+ <li><a href="#Internationalization">Internationalization</a></li>
+ <li><a href="#Creating_Resource_Bundles">Creating Resource Bundles</a></li>
+ <li><a href="#Loading_Resource_Bundles">Loading Resource Bundles</a></li>
+ <li><a href="#Maven_Integration">Maven Integration</a></li>
+ </ol>
+ </section>
+
+ <section name="Requirements">
+ <ul>
+ <li>Java 1.3 (or higher)</li>
+ <li>GNU gettext</li>
+ </ul>
+ </section>
+
+ <section name="Installation">
+ <subsection name="Windows">
+ </subsection>
+
+ <subsection name="*nix">
+ <p>Most Unix systems and Linux distributions ship with gettext
+ packages.</p>
+ </subsection>
+ </section>
+
+ <section name="Internationalization">
+ <p>The Gettext Commons provide the class <tt><a
+ href="http://xnap-commons.sourceforge.net/gettext-commons/apidocs/org/xnap/commons/i18n/I18n.html">I18n</a></tt>
+ that has methods that need to be invoked each time a user visible
+ string is used:</p>
+
+ <source>
+I18n i18n = I18nFactory.getI18n(getClass());
+
+System.out.println(i18n.tr("This text will be translated"));
+</source>
+
+ <p>I18n also supports proper handling of plurals:</p>
+
+ <source>
+System.out.println(i18n.trn("Copied file.", "Copied files.", 1));
+// will print "Copied file."
+
+System.out.println(i18n.trn("Copied file.", "Copied files.", 4));
+// will print "Copied files."
+</source>
+
+ <p>In addition there are convenience methods that use the Java API
+ <tt>MessageFormat.format()</tt> for substitution:</p>
+
+ <source>
+System.out.println(i18n.tr("Folder: {0}", new File("/home/xnap-commons"));
+System.out.println(i18n.trn("{0} file", "{0} files", 5, new Integer(5)));
+</source>
+
+ <p>And sometimes it is necessary to provide different
+ translations of the same word as some words may have multiple
+ meanings in the native language the program is written but
+ not in other languages:</p>
+
+ <source>
+System.out.println(i18n.trc("chat (verb)", "chat"));
+System.out.println(i18n.trc("chat (noun)", "chat"));</source>
+
+ <p>The preferable way to create an I18n object is through the <a
+ href="http://xnap-commons.sourceforge.net/gettext-commons/apidocs/org/xnap/commons/i18n/I18nFactory.html">I18nFactory</a>.
+ The factory caches the I18n object internally using the the package
+ name of the provided class object and registers it with
+ I18nManager. Thus all classes of the same package will use the same
+ I18n instance.</p>
+
+ <source>
+public class SampleClass
+{
+ private static I18n i18n = I18nFactory.getI18n(SampleClass.class);
+
+ String localizedString;
+
+ public SampleClass()
+ {
+ localizedString = i18n.tr("Hello, World");
+ }
+}
+</source>
+
+ <p><a
+ href="http://xnap-commons.sourceforge.net/gettext-commons/apidocs/org/xnap/commons/i18n/I18nManager.html">I18nManager</a>
+ lets you register independently created I18n objects and provides
+ the facility to change the locale of all registered I18n objects thereby
+ notifying possible LocaleChangeListeners:</p>
+
+<source>
+public class LocaleChangeAwareClass implements LocaleChangeListener
+{
+ private static I18n i18n = I18nFactory.getI18n(LocaleChangeAwareClass.class);
+
+ String localizedString;
+
+ public LocaleChangeAwareClass()
+ {
+ localizedString = i18n.tr("Hello, World");
+ I18nManager.getInstance().addWeakLocaleChangeListener(this);
+ }
+
+ public void localeChanged(LocaleChangeEvent event)
+ {
+ // update strings
+ localizedString = i18n.tr("Hello, World");
+ ...
+ }
+}
+</source>
+
+ </section>
+ <section name="Creating Resource Bundles">
+ <p>Once the source code has been internationalized, i.e. all
+ user visible strings are wrapped by a call to
+ <code>i18n.tr()</code>, xgettext can be used to extract these
+ strings for localization.</p>
+
+ <p>This 3 step process is illustrated in this figure:</p>
+
+ <center><img src="gettext-structure.png" border="0"></img></center>
+
+ <ol>
+ <li>
+ <b>xgettext</b> scans the source code for calls to
+ <tt>tr()</tt>, <tt>trc()</tt> and <tt>trn()</tt> and creates
+ a pot file that contains all strings in the native language.
+ </li>
+ <li>
+ <b>msgmerge</b> merges the strings into a po file that
+ contains translations for a single locale. This file can be
+ edited with convenient tools like <a
+ href="http://www.poedit.org/">poedit</a>, KBabel or Emacs.
+ </li>
+ <li>
+ <b>msgfmt</b> is used to generate Java class files that
+ extend the Java <tt>ResourceBundle</tt> class.
+ </li>
+ </ol>
+
+ <p>Here is a simple example of running the gettext commands:</p>
+
+ <source>
+# extract keys
+xgettext -ktrc -ktr -kmarktr -ktrn:1,2 -o po/keys.pot src/*.java
+
+# merge keys into localized po file
+msgmerge -U po/de.po po/keys.pot
+
+# translate file
+poedit po/de.po
+
+# create German ResourceBundle class file in app.i18n package
+msgfmt --java2 -d src/conf -r app.i18n.Messages -l de po/de.po
+</source>
+
+ </section>
+ <section name="Loading Resource Bundles">
+ <p>In order to specify the name of the resource bundles you want to
+ use, you create an <tt>i18n.properties</tt> file and place it in your
+ application's toplevel package. All subpackages will use this
+ configuration file unless they find a different one on the way up in
+ the package hierarchy.</p>
+
+ <p><b>i18n.properties</b> expects the base name of the resources as
+ the value of the key <tt>basename</tt>:</p>
+ <source>
+basename=app.i18n.Messages</source>
+
+ <p>For more information on how the resource lookup works, please read <a href="http://xnap-commons.sourceforge.net/gettext-commons/apidocs/org/xnap/commons/i18n/I18nFactory.html#getI18n(java.lang.Class, java.lang.String)">here</a>.</p>
+
+ </section>
+
+
+ <section name="Maven Integration">
+ <p>If Maven is used for building, the invocation of gettext can
+ be easily integrated into the build process. Follow the
+ appropriate link below for more information:</p>
+
+ <ul>
+ <li><a
+ href="http://xnap-commons.sourceforge.net/m1/maven-gettext-plugin/index.html">Maven 1.x Gettext Plugin</a></li>
+ <li><a
+ href="http://xnap-commons.sourceforge.net/m2/maven-gettext-plugin/index.html">Maven
+ 2.x Gettext Plugin</a></li>
+ </ul>
+ </section>
+
+ </body>
+</document>
+
+<!--
+Local Variables:
+sgml-indent-data: t
+End:
+-->
\ No newline at end of file
View it on GitLab: https://salsa.debian.org/java-team/libgettext-commons-java/-/commit/cc1c8e05c75b48336e307a47408410c00c961908
--
View it on GitLab: https://salsa.debian.org/java-team/libgettext-commons-java/-/commit/cc1c8e05c75b48336e307a47408410c00c961908
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20250204/67364e0f/attachment.htm>
More information about the pkg-java-commits
mailing list