Skip to content

Commit

Permalink
Version 1.5.0
Browse files Browse the repository at this point in the history
Added German and French. Changed package name. Added getter for current
language. Added changing language capability.
  • Loading branch information
pedroadame committed May 11, 2015
1 parent 9121f18 commit 238abb4
Show file tree
Hide file tree
Showing 6 changed files with 142 additions and 140 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Java 'TimeAgo' multilanguage library
#Java 'TimeAgo' multilanguage library 1.5.0

This is a Java port of the [jquery-timeago](https://github.com/rmm5t/jquery-timeago) plug-in. Please visit the [jquery-timeago](http://rmm5t.github.com/jquery-timeago/) project page to read more about fuzzy timestamps.

Expand All @@ -19,7 +19,7 @@ This library is forked from Kevin Sawicki's 'java-timeago' to support more than
<dependency>
<groupId>com.github.Kinnonii</groupId>
<artifactId>java-timeago</artifactId>
<version>timeago-1.1.3</version>
<version>1.5.0</version>
</dependency>
```
###Gradle
Expand All @@ -31,7 +31,7 @@ repositories {
}
}
dependencies {
compile 'com.github.Kinnonii:java-timeago:timeago-1.1.3'
compile 'com.github.Kinnonii:java-timeago:1.5.0'
}
```

Expand Down Expand Up @@ -69,18 +69,17 @@ dependencies {
}
```

##Currently in work
* Deutsch
* French

It supports English, Spanish and Italian at the time.
####It supports English, Spanish and Italian, French and German at the time.

##Usage

```java
TimeAgo time = new TimeAgo('en'); //For English text.
//TimeAgo time = new TimeAgo('it'); //For Italian text.
//TimeAgo time = new TimeAgo('es'); //For Spanish text.
//TimeAgo time = new TimeAgo('de'); //For German text.
//TimeAgo time = new TimeAgo('fr'); //For French text.


long current = System.currentTimeMillis();
Expand Down
252 changes: 128 additions & 124 deletions timeago/pom.xml
Original file line number Diff line number Diff line change
@@ -1,137 +1,141 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>


<groupId>com.github.Kinnonii</groupId>
<artifactId>timeago</artifactId>
<version>1.1.0</version>
<groupId>com.github.Kinnonii</groupId>
<artifactId>timeago</artifactId>
<version>1.5.0</version>

<name>Time Ago</name>
<description>Simple Java library for converting dates to time ago strings.</description>
<url>http://www.github.com/kevinsawicki/java-timeago</url>
<name>Multilanguage Time Ago</name>
<description>Java library that converts dates into "Time ago" strings, supporting multiple languages..</description>
<url>http://www.github.com/Kinnonii/Java-TimeAgo-Multilanguage</url>

<issueManagement>
<url>https://github.com/kevinsawicki/java-timeago/issues</url>
<system>GitHub Issues</system>
</issueManagement>
<issueManagement>
<url>https://github.com/Kinnonii/Java-TimeAgo-Multilanguage/issues</url>
<system>GitHub Issues</system>
</issueManagement>

<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
<distribution>repo</distribution>
</license>
</licenses>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
<distribution>repo</distribution>
</license>
</licenses>

<scm>
<url>https://github.com/kinnonii/java-timeago</url>
<connection>scm:git:git://github.com/kinnonii/java-timeago.git</connection>
<developerConnection>scm:git:[email protected]:kinnonii/java-timeago.git</developerConnection>
</scm>
<scm>
<url>https://github.com/kinnonii/java-timeago</url>
<connection>scm:git:git://github.com/kinnonii/java-timeago.git</connection>
<developerConnection>scm:git:[email protected]:kinnonii/java-timeago.git</developerConnection>
</scm>

<developers>
<developer>
<email>kevinsawicki@gmail.com</email>
<name>Kevin Sawicki</name>
<url>https://github.com/kevinsawicki</url>
<id>kevinsawicki</id>
</developer>
</developers>
<developers>
<developer>
<email>pedro.a.1smr@gmail.com</email>
<name>Pedro Adame Vergara</name>
<url>https://github.com/KinnonII</url>
<id>kinnonii</id>
</developer>
</developers>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>sign</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<profiles>
<profile>
<id>sign</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 Kevin Sawicki <kevinsawicki@gmail.com>
* Copyright (c) 2015 Pedro Adame Vergara <pedro.a.1smr@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
Expand All @@ -19,7 +19,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
package com.github.kevinsawicki.timeago;
package com.github.kinnonii.timeago;

import java.util.MissingResourceException;
import java.util.ResourceBundle;
Expand All @@ -29,7 +29,7 @@
*/
public class Messages {

private static final String BUNDLE_NAME = "com.github.kevinsawicki.timeago.messages"; //$NON-NLS-1$
private static final String BUNDLE_NAME = "com.github.kinnonii.timeago.messages"; //$NON-NLS-1$

private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
.getBundle(BUNDLE_NAME);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015 Pedro Adame <[email protected]>
* Copyright (c) 2015 Pedro Adame Vergara <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
Expand All @@ -19,7 +19,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
package com.github.kevinsawicki.timeago;
package com.github.kinnonii.timeago;

import java.text.MessageFormat;
import java.util.Date;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.github.kevinsawicki.timeago.tests;
package com.github.kinnonii.timeago.tests;
/*
* Copyright (c) 2011 Kevin Sawicki <kevinsawicki@gmail.com>
* Copyright (c) 2015 Pedro Adame Vergara <pedro.a.1smr@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
Expand All @@ -20,10 +20,9 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import com.github.kevinsawicki.timeago.TimeAgo;
import com.github.kinnonii.timeago.TimeAgo;

import java.text.MessageFormat;

import junit.framework.TestCase;

/**
Expand Down

0 comments on commit 238abb4

Please sign in to comment.