├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
└── src
└── i18next-net
├── .vs
└── config
│ └── applicationhost.config
├── i18next-net.Examples.Console
├── App.config
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
├── bin
│ └── Debug
│ │ ├── Newtonsoft.Json.dll
│ │ ├── Newtonsoft.Json.xml
│ │ ├── i18next-net.Examples.Console.exe
│ │ ├── i18next-net.Examples.Console.exe.config
│ │ ├── i18next-net.Examples.Console.pdb
│ │ ├── i18next-net.dll
│ │ ├── i18next-net.pdb
│ │ └── locales
│ │ ├── en
│ │ └── activities.json
│ │ └── pt
│ │ └── activities.json
├── i18next-net.Examples.Console.csproj
├── locales
│ ├── en
│ │ └── activities.json
│ └── pt
│ │ └── activities.json
└── obj
│ └── Debug
│ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ ├── i18next-net.Examples.Console.csproj.CopyComplete
│ ├── i18next-net.Examples.Console.csproj.CoreCompileInputs.cache
│ ├── i18next-net.Examples.Console.csproj.FileListAbsolute.txt
│ ├── i18next-net.Examples.Console.csprojResolveAssemblyReference.cache
│ ├── i18next-net.Examples.Console.exe
│ └── i18next-net.Examples.Console.pdb
├── i18next-net.sln
├── i18next-net
├── InitOptions.cs
├── JsonNetValueSystem.cs
├── LanguageFileTypeEnum.cs
├── Properties
│ └── AssemblyInfo.cs
├── Resources.Designer.cs
├── Resources.resx
├── Resources
│ └── activities.json
├── bin
│ └── Debug
│ │ ├── Newtonsoft.Json.dll
│ │ ├── Newtonsoft.Json.xml
│ │ ├── i18next-net.dll
│ │ └── i18next-net.pdb
├── i18next-net.csproj
├── i18next.cs
└── packages.config
└── packages
└── Newtonsoft.Json.10.0.3
├── LICENSE.md
├── Newtonsoft.Json.10.0.3.nupkg
├── lib
├── net20
│ ├── Newtonsoft.Json.dll
│ └── Newtonsoft.Json.xml
├── net35
│ ├── Newtonsoft.Json.dll
│ └── Newtonsoft.Json.xml
├── net40
│ ├── Newtonsoft.Json.dll
│ └── Newtonsoft.Json.xml
├── net45
│ ├── Newtonsoft.Json.dll
│ └── Newtonsoft.Json.xml
├── netstandard1.0
│ ├── Newtonsoft.Json.dll
│ └── Newtonsoft.Json.xml
├── netstandard1.3
│ ├── Newtonsoft.Json.dll
│ └── Newtonsoft.Json.xml
├── portable-net40+sl5+win8+wp8+wpa81
│ ├── Newtonsoft.Json.dll
│ └── Newtonsoft.Json.xml
└── portable-net45+win8+wp8+wpa81
│ ├── Newtonsoft.Json.dll
│ └── Newtonsoft.Json.xml
└── tools
└── install.ps1
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # This .gitignore file was automatically created by Microsoft(R) Visual Studio.
3 | ################################################################################
4 |
5 | /src/i18next-net/i18next-net/obj/Debug
6 | /.vs
7 | /src/i18next-net/.vs/i18next-net/v15
8 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Leonardo Baggio
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # i18next-net
2 | .NET C# class for basic i18next functionality
3 |
4 | # Basic usage
5 |
6 | In this minimal example, we create a i18n instance with InitOptions configuration in its construtor. Since no path have been specified, the i18next-net will load files from the default directory `\locales\` relative to current running assembly:
7 |
8 | ### Locale file
9 | ```json
10 | {
11 | "CONTENT": {
12 | "COMMENT_ADD": "Commented \"{{text}}\" on {{type}} \"{{title}}\""
13 | }
14 | }
15 | ```
16 | ### Code
17 | ```csharp
18 | i18next i18n = new i18next(new InitOptions()
19 | {
20 | defaultNS = "common",
21 | localeFileType = LocaleFileTypeEnum.Path,
22 | fallbackLng = "en"
23 | });
24 |
25 |
26 | i18n.changeLanguage("pt");
27 | var res = i18n.t("activities:CONTENT.COMMENT_ADD", new {text= "blablabla", type = "a pendencia", title = "Revisar orçamento" });
28 | System.Console.WriteLine(res);
29 |
30 | i18n.changeLanguage("en");
31 | var res2 = i18n.t("activities:CONTENT.COMMENT_ADD", new { text = "blablabla", type = "a pendencia", title = "Revisar orçamento" });
32 | System.Console.WriteLine(res2);
33 |
34 | System.Console.ReadKey();
35 | ```
36 |
37 | ### Output
38 | 
39 |
40 |
41 | # To-do
42 | - [ ] Project structure
43 | - [X] Solution and project
44 | - [ ] NuGet specification
45 | - [ ] Basic Documentation
46 | - [ ] Test project
47 | - [X] Examples
48 | - [ ] Advanced Documentation
49 | - [X] Read locales files
50 | - [X] Pre Load option for all files locales files available
51 | - [ ] Read locales from "Resource Files"
52 | - [ ] Read locales from remote server / web
53 | - [X] Translate method with basic Interpolation
54 | - [X] Fallback capability
55 | - [ ] Pluralization
56 | - [ ] Auto detect current language
57 | - [ ] Configurations
58 | - [ ] Advanced features
59 |
--------------------------------------------------------------------------------
/src/i18next-net/.vs/config/applicationhost.config:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 |
491 |
492 |
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 |
510 |
511 |
512 |
513 |
514 |
515 |
516 |
517 |
518 |
519 |
520 |
521 |
522 |
523 |
524 |
525 |
526 |
527 |
528 |
529 |
530 |
531 |
532 |
533 |
534 |
535 |
536 |
537 |
538 |
539 |
540 |
541 |
542 |
543 |
544 |
545 |
546 |
547 |
548 |
549 |
550 |
551 |
552 |
553 |
554 |
555 |
556 |
557 |
558 |
559 |
560 |
561 |
562 |
563 |
564 |
565 |
566 |
567 |
568 |
569 |
570 |
571 |
572 |
573 |
574 |
575 |
576 |
577 |
578 |
579 |
580 |
581 |
582 |
583 |
584 |
585 |
586 |
587 |
588 |
589 |
590 |
591 |
592 |
593 |
594 |
595 |
596 |
597 |
598 |
599 |
600 |
601 |
602 |
603 |
604 |
605 |
606 |
607 |
608 |
609 |
610 |
611 |
612 |
613 |
614 |
615 |
616 |
617 |
618 |
619 |
620 |
621 |
622 |
623 |
624 |
625 |
626 |
627 |
628 |
629 |
630 |
631 |
632 |
633 |
634 |
635 |
636 |
637 |
638 |
639 |
640 |
641 |
642 |
643 |
644 |
645 |
646 |
647 |
648 |
649 |
650 |
651 |
652 |
653 |
654 |
655 |
656 |
657 |
658 |
659 |
660 |
661 |
662 |
663 |
664 |
665 |
666 |
667 |
668 |
669 |
670 |
671 |
672 |
673 |
674 |
675 |
676 |
677 |
678 |
679 |
680 |
681 |
682 |
683 |
684 |
685 |
686 |
687 |
688 |
689 |
690 |
691 |
692 |
693 |
694 |
695 |
696 |
697 |
698 |
699 |
700 |
701 |
702 |
703 |
704 |
705 |
706 |
707 |
708 |
709 |
710 |
711 |
712 |
713 |
714 |
715 |
716 |
717 |
718 |
719 |
720 |
721 |
722 |
723 |
724 |
725 |
726 |
727 |
728 |
729 |
730 |
731 |
732 |
733 |
734 |
735 |
736 |
737 |
738 |
739 |
740 |
741 |
742 |
743 |
744 |
745 |
746 |
747 |
748 |
749 |
750 |
751 |
752 |
753 |
754 |
755 |
756 |
757 |
758 |
759 |
760 |
761 |
762 |
763 |
764 |
765 |
766 |
767 |
768 |
769 |
770 |
771 |
772 |
773 |
774 |
775 |
776 |
777 |
778 |
779 |
780 |
781 |
782 |
783 |
784 |
785 |
786 |
787 |
788 |
789 |
790 |
791 |
792 |
793 |
794 |
795 |
796 |
797 |
798 |
799 |
800 |
801 |
802 |
803 |
804 |
805 |
806 |
807 |
808 |
809 |
810 |
811 |
812 |
813 |
814 |
815 |
816 |
817 |
818 |
819 |
820 |
821 |
822 |
823 |
824 |
825 |
826 |
827 |
828 |
829 |
830 |
831 |
832 |
833 |
834 |
835 |
836 |
837 |
838 |
839 |
840 |
841 |
842 |
843 |
844 |
845 |
846 |
847 |
848 |
849 |
850 |
851 |
852 |
853 |
854 |
855 |
856 |
857 |
858 |
859 |
860 |
861 |
862 |
863 |
864 |
865 |
866 |
867 |
868 |
869 |
870 |
871 |
872 |
873 |
874 |
875 |
876 |
877 |
878 |
879 |
880 |
881 |
882 |
883 |
884 |
887 |
888 |
889 |
890 |
891 |
892 |
893 |
894 |
895 |
896 |
897 |
898 |
899 |
902 |
903 |
904 |
905 |
906 |
907 |
908 |
909 |
910 |
911 |
912 |
913 |
914 |
915 |
916 |
917 |
918 |
919 |
920 |
921 |
922 |
923 |
924 |
925 |
926 |
927 |
928 |
929 |
930 |
931 |
932 |
933 |
934 |
935 |
936 |
937 |
938 |
939 |
940 |
941 |
942 |
943 |
944 |
945 |
946 |
947 |
948 |
949 |
950 |
951 |
952 |
953 |
954 |
955 |
956 |
957 |
958 |
959 |
960 |
961 |
962 |
963 |
964 |
965 |
966 |
967 |
968 |
969 |
970 |
971 |
972 |
973 |
974 |
975 |
976 |
977 |
978 |
979 |
980 |
981 |
982 |
983 |
984 |
985 |
986 |
987 |
988 |
989 |
990 |
991 |
992 |
993 |
994 |
995 |
996 |
997 |
998 |
999 |
1000 |
1001 |
1002 |
1003 |
1004 |
1005 |
1006 |
1007 |
1008 |
1009 |
1010 |
1011 |
1012 |
1013 |
1014 |
1015 |
1016 |
1017 |
1018 |
1019 |
1020 |
1021 |
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace i18next_net.Examples.Console
8 | {
9 | class Program
10 | {
11 | static void Main(string[] args)
12 | {
13 | i18next i18n = new i18next(new InitOptions()
14 | {
15 | defaultNS = "common",
16 | localeFileType = LocaleFileTypeEnum.Path,
17 | fallbackLng = "en"
18 | });
19 |
20 |
21 | i18n.changeLanguage("pt");
22 | var res = i18n.t("activities:CONTENT.COMMENT_ADD", new {text= "blablbla", type = "a pendencia", title = "Revisar orçamento" });
23 | System.Console.WriteLine(res);
24 |
25 | i18n.changeLanguage("en");
26 | var res2 = i18n.t("activities:CONTENT.COMMENT_ADD", new { text = "blablbla", type = "a pendencia", title = "Revisar orçamento" });
27 | System.Console.WriteLine(res2);
28 |
29 | System.Console.ReadKey();
30 |
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("i18next-net.Examples.Console")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("i18next-net.Examples.Console")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("d1fa4705-0614-476e-86ff-326d9a1518bc")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/bin/Debug/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/i18next-net.Examples.Console/bin/Debug/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/bin/Debug/i18next-net.Examples.Console.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/i18next-net.Examples.Console/bin/Debug/i18next-net.Examples.Console.exe
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/bin/Debug/i18next-net.Examples.Console.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/bin/Debug/i18next-net.Examples.Console.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/i18next-net.Examples.Console/bin/Debug/i18next-net.Examples.Console.pdb
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/bin/Debug/i18next-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/i18next-net.Examples.Console/bin/Debug/i18next-net.dll
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/bin/Debug/i18next-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/i18next-net.Examples.Console/bin/Debug/i18next-net.pdb
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/bin/Debug/locales/en/activities.json:
--------------------------------------------------------------------------------
1 | {
2 | "CONTENT": {
3 | "COMMENT_ADD": "Commented \"{{text}}\" on {{type}} \"{{title}}\"",
4 | "ATTACHMENT_ADD": "Added the attachment to {{type}} {{title}}",
5 | "UPDATED": "Updated details for {{type}} {{title}}",
6 | "CREATED": "Created a new {{type}} {{title}}",
7 | "STATUS_CLOSED": "Closed the {{type}} {{title}}",
8 | "STATUS_OPEN": "Changed the status of {{type}} {{title}} to OPEN",
9 | "STATUS_AWAITING_REVIEW": "Send {{type}} {{title}} to review",
10 | "STATUS_READY": "Set the {{type}} {{title}} as ready",
11 | "STATUS_READY_MEETING": "Set the meeting as Ready",
12 | "STATUS_PUBLISHED": "Published the {{type}} {{title}}",
13 | "SUBSCRIBER_ADD": "Added a subscriber to {{type}} {{title}}",
14 | "SUBSCRIBER_DELETE": "Removed a subscriber from {{type}} {{title}}",
15 | "SUBSCRIBER_UPDATE": "Updated the subscribers for {{type}} {{title}}",
16 | "SUBSCRIBER_UPDATE_MEETING": "Updated the atendees for the meeting",
17 | "ATTACHMENT_DOWNLOAD": "Downloaded the attachment {{text}} from {{type}} {{title}}",
18 | "CREATED_MEETING": "Created a new meeting",
19 | "CREATED_MEETINGMINUTE": "Created a new meeting minute",
20 | "COMMENT_MENTION": "Mentioned {{userName}} on the comment {{text}}",
21 | "BLUEBOOK_DOWNLOAD": "Downloaded the meeting's BLUEBOOK"
22 | },
23 | "Type":{
24 | "Task": "action",
25 | "Pipeline": "pipeline",
26 | "PipelineItem": "opportunity",
27 | "Meeting": "meeting",
28 | "MeetingAgendaItem": "meeting agenda",
29 | "MeetingMinute": "meeting minute",
30 | "KnowledgeArticle": "article"
31 | },
32 | "list": {
33 | "range": "Range",
34 | "from": "From",
35 | "to": "To",
36 | "title": "Browse recent activity",
37 | "workgroups": "Boards & Projects",
38 | "actionUser": "Action User",
39 | "types": "Types",
40 | "previous": "Previous",
41 | "next": "Next",
42 | "loading": "Loading...",
43 | "noTypes": "No types found",
44 | "noUsers": "No users found",
45 | "noWorkgroups": "No boards/projects found"
46 | }
47 | }
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/bin/Debug/locales/pt/activities.json:
--------------------------------------------------------------------------------
1 | {
2 | "CONTENT": {
3 | "COMMENT_ADD": "Comentou \"{{text}}\" n{{type}} \"{{title}}\"",
4 | "ATTACHMENT_ADD": "Adicionou o anexo {{text}} n{{type}} {{title}}",
5 | "UPDATED": "Atualizou detalhes d{{type}} {{title}}",
6 | "CREATED": "Criou {{type}} {{title}}",
7 | "STATUS_CLOSED": "Finalizou {{type}} {{title}}",
8 | "STATUS_OPEN": "Reabriu {{type}} {{title}}",
9 | "STATUS_AWAITING_REVIEW": "Enviou {{type}} {{title}} para revisão",
10 | "STATUS_READY": "Marcou como pronta para realização {{type}} {{title}}",
11 | "STATUS_READY_MEETING": "Marcou uma reunião como Pronta para Realização",
12 | "STATUS_PUBLISHED": "Publicou {{type}} {{title}}",
13 | "SUBSCRIBER_ADD": "Adicionou um inscrito n{{type}} {{title}}",
14 | "SUBSCRIBER_DELETE": "Removeu um inscrito d{{type}} {{title}}",
15 | "SUBSCRIBER_UPDATE": "Atualizou os inscritos d{{type}} {{title}}",
16 | "SUBSCRIBER_UPDATE_MEETING": "Atualizou os participantes da reunião",
17 | "ATTACHMENT_DOWNLOAD": "Fez o download do anexo {{text}} d{{type}} {{title}}",
18 | "CREATED_MEETING": "Criou uma nova reunião",
19 | "CREATED_MEETINGMINUTE": "Criou uma ata na reunião",
20 | "COMMENT_MENTION": "Mencionou {{userName}} no comentário {{text}}",
21 | "BLUEBOOK_DOWNLOAD": "Fez o download do BLUEBOOK da reunião"
22 | },
23 | "Type": {
24 | "Task": "a ação",
25 | "Pipeline": "o pipeline",
26 | "PipelineItem": "a oportunidade",
27 | "Meeting": "a reunião",
28 | "MeetingAgendaItem": "a pauta",
29 | "MeetingMinute": "a ata",
30 | "KnowledgeArticle": "o artigo"
31 | },
32 | "list":{
33 | "range": "Intervalo",
34 | "from": "De",
35 | "to": "Até",
36 | "title": "Explorar atividade recente",
37 | "workgroups": "Boards & Projetos",
38 | "actionUser": "Usuário da Ação",
39 | "types": "Tipos",
40 | "previous": "Anterior",
41 | "next": "Próxima",
42 | "loading": "Carregando...",
43 | "noTypes": "Nenhum tipo encontrado",
44 | "noUsers": "Nenhum usuário encontrado",
45 | "noWorkgroups": "Nenhum board/projeto encontrado"
46 | }
47 | }
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/i18next-net.Examples.Console.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {D1FA4705-0614-476E-86FF-326D9A1518BC}
8 | Exe
9 | i18next_net.Examples.Console
10 | i18next-net.Examples.Console
11 | v4.6.1
12 | 512
13 | true
14 |
15 |
16 | AnyCPU
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | AnyCPU
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | {5293fe76-958a-4c12-92ba-9db2192f463a}
56 | i18next-net
57 |
58 |
59 |
60 |
61 | xcopy /E "$(ProjectDir)\locales" "$(TargetDir)\locales\*"
62 |
63 |
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/locales/en/activities.json:
--------------------------------------------------------------------------------
1 | {
2 | "CONTENT": {
3 | "COMMENT_ADD": "Commented \"{{text}}\" on {{type}} \"{{title}}\"",
4 | "ATTACHMENT_ADD": "Added the attachment to {{type}} {{title}}",
5 | "UPDATED": "Updated details for {{type}} {{title}}",
6 | "CREATED": "Created a new {{type}} {{title}}",
7 | "STATUS_CLOSED": "Closed the {{type}} {{title}}",
8 | "STATUS_OPEN": "Changed the status of {{type}} {{title}} to OPEN",
9 | "STATUS_AWAITING_REVIEW": "Send {{type}} {{title}} to review",
10 | "STATUS_READY": "Set the {{type}} {{title}} as ready",
11 | "STATUS_READY_MEETING": "Set the meeting as Ready",
12 | "STATUS_PUBLISHED": "Published the {{type}} {{title}}",
13 | "SUBSCRIBER_ADD": "Added a subscriber to {{type}} {{title}}",
14 | "SUBSCRIBER_DELETE": "Removed a subscriber from {{type}} {{title}}",
15 | "SUBSCRIBER_UPDATE": "Updated the subscribers for {{type}} {{title}}",
16 | "SUBSCRIBER_UPDATE_MEETING": "Updated the atendees for the meeting",
17 | "ATTACHMENT_DOWNLOAD": "Downloaded the attachment {{text}} from {{type}} {{title}}",
18 | "CREATED_MEETING": "Created a new meeting",
19 | "CREATED_MEETINGMINUTE": "Created a new meeting minute",
20 | "COMMENT_MENTION": "Mentioned {{userName}} on the comment {{text}}",
21 | "BLUEBOOK_DOWNLOAD": "Downloaded the meeting's BLUEBOOK"
22 | },
23 | "Type":{
24 | "Task": "action",
25 | "Pipeline": "pipeline",
26 | "PipelineItem": "opportunity",
27 | "Meeting": "meeting",
28 | "MeetingAgendaItem": "meeting agenda",
29 | "MeetingMinute": "meeting minute",
30 | "KnowledgeArticle": "article"
31 | },
32 | "list": {
33 | "range": "Range",
34 | "from": "From",
35 | "to": "To",
36 | "title": "Browse recent activity",
37 | "workgroups": "Boards & Projects",
38 | "actionUser": "Action User",
39 | "types": "Types",
40 | "previous": "Previous",
41 | "next": "Next",
42 | "loading": "Loading...",
43 | "noTypes": "No types found",
44 | "noUsers": "No users found",
45 | "noWorkgroups": "No boards/projects found"
46 | }
47 | }
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/locales/pt/activities.json:
--------------------------------------------------------------------------------
1 | {
2 | "CONTENT": {
3 | "COMMENT_ADD": "Comentou \"{{text}}\" n{{type}} \"{{title}}\"",
4 | "ATTACHMENT_ADD": "Adicionou o anexo {{text}} n{{type}} {{title}}",
5 | "UPDATED": "Atualizou detalhes d{{type}} {{title}}",
6 | "CREATED": "Criou {{type}} {{title}}",
7 | "STATUS_CLOSED": "Finalizou {{type}} {{title}}",
8 | "STATUS_OPEN": "Reabriu {{type}} {{title}}",
9 | "STATUS_AWAITING_REVIEW": "Enviou {{type}} {{title}} para revisão",
10 | "STATUS_READY": "Marcou como pronta para realização {{type}} {{title}}",
11 | "STATUS_READY_MEETING": "Marcou uma reunião como Pronta para Realização",
12 | "STATUS_PUBLISHED": "Publicou {{type}} {{title}}",
13 | "SUBSCRIBER_ADD": "Adicionou um inscrito n{{type}} {{title}}",
14 | "SUBSCRIBER_DELETE": "Removeu um inscrito d{{type}} {{title}}",
15 | "SUBSCRIBER_UPDATE": "Atualizou os inscritos d{{type}} {{title}}",
16 | "SUBSCRIBER_UPDATE_MEETING": "Atualizou os participantes da reunião",
17 | "ATTACHMENT_DOWNLOAD": "Fez o download do anexo {{text}} d{{type}} {{title}}",
18 | "CREATED_MEETING": "Criou uma nova reunião",
19 | "CREATED_MEETINGMINUTE": "Criou uma ata na reunião",
20 | "COMMENT_MENTION": "Mencionou {{userName}} no comentário {{text}}",
21 | "BLUEBOOK_DOWNLOAD": "Fez o download do BLUEBOOK da reunião"
22 | },
23 | "Type": {
24 | "Task": "a ação",
25 | "Pipeline": "o pipeline",
26 | "PipelineItem": "a oportunidade",
27 | "Meeting": "a reunião",
28 | "MeetingAgendaItem": "a pauta",
29 | "MeetingMinute": "a ata",
30 | "KnowledgeArticle": "o artigo"
31 | },
32 | "list":{
33 | "range": "Intervalo",
34 | "from": "De",
35 | "to": "Até",
36 | "title": "Explorar atividade recente",
37 | "workgroups": "Boards & Projetos",
38 | "actionUser": "Usuário da Ação",
39 | "types": "Tipos",
40 | "previous": "Anterior",
41 | "next": "Próxima",
42 | "loading": "Carregando...",
43 | "noTypes": "Nenhum tipo encontrado",
44 | "noUsers": "Nenhum usuário encontrado",
45 | "noWorkgroups": "Nenhum board/projeto encontrado"
46 | }
47 | }
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/i18next-net.Examples.Console/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/i18next-net.Examples.Console/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/i18next-net.Examples.Console/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/i18next-net.Examples.Console/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/obj/Debug/i18next-net.Examples.Console.csproj.CopyComplete:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/i18next-net.Examples.Console/obj/Debug/i18next-net.Examples.Console.csproj.CopyComplete
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/obj/Debug/i18next-net.Examples.Console.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | b672bd3b7d2566f9321220fc62e97275a1936aab
2 |
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/obj/Debug/i18next-net.Examples.Console.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | C:\Projetos\Repos\i18next-net\src\i18next-net\i18next-net.Examples.Console\bin\Debug\i18next-net.Examples.Console.exe.config
2 | C:\Projetos\Repos\i18next-net\src\i18next-net\i18next-net.Examples.Console\bin\Debug\i18next-net.Examples.Console.exe
3 | C:\Projetos\Repos\i18next-net\src\i18next-net\i18next-net.Examples.Console\bin\Debug\i18next-net.Examples.Console.pdb
4 | C:\Projetos\Repos\i18next-net\src\i18next-net\i18next-net.Examples.Console\bin\Debug\i18next-net.dll
5 | C:\Projetos\Repos\i18next-net\src\i18next-net\i18next-net.Examples.Console\bin\Debug\Newtonsoft.Json.dll
6 | C:\Projetos\Repos\i18next-net\src\i18next-net\i18next-net.Examples.Console\bin\Debug\i18next-net.pdb
7 | C:\Projetos\Repos\i18next-net\src\i18next-net\i18next-net.Examples.Console\bin\Debug\Newtonsoft.Json.xml
8 | C:\Projetos\Repos\i18next-net\src\i18next-net\i18next-net.Examples.Console\obj\Debug\i18next-net.Examples.Console.csprojResolveAssemblyReference.cache
9 | C:\Projetos\Repos\i18next-net\src\i18next-net\i18next-net.Examples.Console\obj\Debug\i18next-net.Examples.Console.csproj.CoreCompileInputs.cache
10 | C:\Projetos\Repos\i18next-net\src\i18next-net\i18next-net.Examples.Console\obj\Debug\i18next-net.Examples.Console.exe
11 | C:\Projetos\Repos\i18next-net\src\i18next-net\i18next-net.Examples.Console\obj\Debug\i18next-net.Examples.Console.pdb
12 |
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/obj/Debug/i18next-net.Examples.Console.csprojResolveAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/i18next-net.Examples.Console/obj/Debug/i18next-net.Examples.Console.csprojResolveAssemblyReference.cache
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/obj/Debug/i18next-net.Examples.Console.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/i18next-net.Examples.Console/obj/Debug/i18next-net.Examples.Console.exe
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.Examples.Console/obj/Debug/i18next-net.Examples.Console.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/i18next-net.Examples.Console/obj/Debug/i18next-net.Examples.Console.pdb
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26730.16
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "i18next-net", "i18next-net\i18next-net.csproj", "{5293FE76-958A-4C12-92BA-9DB2192F463A}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "i18next-net.Examples.Console", "i18next-net.Examples.Console\i18next-net.Examples.Console.csproj", "{D1FA4705-0614-476E-86FF-326D9A1518BC}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {5293FE76-958A-4C12-92BA-9DB2192F463A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {5293FE76-958A-4C12-92BA-9DB2192F463A}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {5293FE76-958A-4C12-92BA-9DB2192F463A}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {5293FE76-958A-4C12-92BA-9DB2192F463A}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {D1FA4705-0614-476E-86FF-326D9A1518BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {D1FA4705-0614-476E-86FF-326D9A1518BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {D1FA4705-0614-476E-86FF-326D9A1518BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {D1FA4705-0614-476E-86FF-326D9A1518BC}.Release|Any CPU.Build.0 = Release|Any CPU
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {DD2DECF4-D2A5-48E6-A92F-123D56761A8E}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net/InitOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace i18next_net
8 | {
9 | public class InitOptions
10 | {
11 | public string fallbackLng { get; set; }
12 | public string defaultNS { get; set; }
13 | public LocaleFileTypeEnum localeFileType { get; set; }
14 | public string localesPath { get; set; }
15 | public bool preLoadLocales { get; set; }
16 | public bool autoDetect { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net/JsonNetValueSystem.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json.Linq;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace i18next_net
9 | {
10 | //public sealed class JsonNetValueSystem : IJsonPathValueSystem
11 | //{
12 | // public bool HasMember(object value, string member)
13 | // {
14 | // if (value is JObject)
15 | // return (value as JObject).Properties().Any(property => property.Name == member);
16 | // if (value is JArray)
17 | // {
18 | // int index = ParseInt(member, -1);
19 | // return index >= 0 && index < (value as JArray).Count;
20 | // }
21 | // return false;
22 | // }
23 |
24 | // public object GetMemberValue(object value, string member)
25 | // {
26 | // if (value is JObject)
27 | // {
28 | // var memberValue = (value as JObject)[member];
29 | // return memberValue;
30 | // }
31 | // if (value is JArray)
32 | // {
33 | // int index = ParseInt(member, -1);
34 | // return (value as JArray)[index];
35 | // }
36 | // return null;
37 | // }
38 |
39 | // public IEnumerable GetMembers(object value)
40 | // {
41 | // var jobject = value as JObject;
42 | // return jobject.Properties().Select(property => property.Name);
43 | // }
44 |
45 | // public bool IsObject(object value)
46 | // {
47 | // return value is JObject;
48 | // }
49 |
50 | // public bool IsArray(object value)
51 | // {
52 | // return value is JArray;
53 | // }
54 |
55 | // public bool IsPrimitive(object value)
56 | // {
57 | // if (value == null)
58 | // throw new ArgumentNullException("value");
59 |
60 | // return value is JObject || value is JArray ? false : true;
61 | // }
62 |
63 | // private int ParseInt(string s, int defaultValue)
64 | // {
65 | // int result;
66 | // return int.TryParse(s, out result) ? result : defaultValue;
67 | // }
68 | //}
69 |
70 | }
71 |
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net/LanguageFileTypeEnum.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace i18next_net
8 | {
9 | public enum LocaleFileTypeEnum
10 | {
11 | Resource = 0,
12 | Path = 1,
13 | Web = 2
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("i18next-net")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("i18next-net")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("5293fe76-958a-4c12-92ba-9db2192f463a")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace i18next_net {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("i18next_net.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// Looks up a localized resource of type System.Byte[].
65 | ///
66 | internal static byte[] activities {
67 | get {
68 | object obj = ResourceManager.GetObject("activities", resourceCulture);
69 | return ((byte[])(obj));
70 | }
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 | Resources\activities.json;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
123 |
124 |
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net/Resources/activities.json:
--------------------------------------------------------------------------------
1 | {
2 | "CONTENT": {
3 | "COMMENT_ADD": "Comentou {{text}} n{{type}} {{title}}",
4 | "ATTACHMENT_ADD": "Adicionou o anexo {{text}} n{{type}} {{title}}",
5 | "UPDATED": "Atualizou detalhes d{{type}} {{title}}",
6 | "CREATED": "Criou {{type}} {{title}}",
7 | "STATUS_CLOSED": "Finalizou {{type}} {{title}}",
8 | "STATUS_OPEN": "Reabriu {{type}} {{title}}",
9 | "STATUS_AWAITING_REVIEW": "Enviou {{type}} {{title}} para revisão",
10 | "STATUS_READY": "Marcou como pronta para realização {{type}} {{title}}",
11 | "STATUS_READY_MEETING": "Marcou uma reunião como Pronta para Realização",
12 | "STATUS_PUBLISHED": "Publicou {{type}} {{title}}",
13 | "SUBSCRIBER_ADD": "Adicionou um inscrito n{{type}} {{title}}",
14 | "SUBSCRIBER_DELETE": "Removeu um inscrito d{{type}} {{title}}",
15 | "SUBSCRIBER_UPDATE": "Atualizou os inscritos d{{type}} {{title}}",
16 | "SUBSCRIBER_UPDATE_MEETING": "Atualizou os participantes da reunião",
17 | "ATTACHMENT_DOWNLOAD": "Fez o download do anexo {{text}} d{{type}} {{title}}",
18 | "CREATED_MEETING": "Criou uma nova reunião",
19 | "CREATED_MEETINGMINUTE": "Criou uma ata na reunião",
20 | "COMMENT_MENTION": "Mencionou {{userName}} no comentário {{text}}",
21 | "BLUEBOOK_DOWNLOAD": "Fez o download do BLUEBOOK da reunião"
22 | },
23 | "Type": {
24 | "Task": "a ação",
25 | "Pipeline": "o pipeline",
26 | "PipelineItem": "a oportunidade",
27 | "Meeting": "a reunião",
28 | "MeetingAgendaItem": "a pauta",
29 | "MeetingMinute": "a ata",
30 | "KnowledgeArticle": "o artigo"
31 | },
32 | "list":{
33 | "range": "Intervalo",
34 | "from": "De",
35 | "to": "Até",
36 | "title": "Explorar atividade recente",
37 | "workgroups": "Boards & Projetos",
38 | "actionUser": "Usuário da Ação",
39 | "types": "Tipos",
40 | "previous": "Anterior",
41 | "next": "Próxima",
42 | "loading": "Carregando...",
43 | "noTypes": "Nenhum tipo encontrado",
44 | "noUsers": "Nenhum usuário encontrado",
45 | "noWorkgroups": "Nenhum board/projeto encontrado"
46 | }
47 | }
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net/bin/Debug/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/i18next-net/bin/Debug/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net/bin/Debug/i18next-net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/i18next-net/bin/Debug/i18next-net.dll
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net/bin/Debug/i18next-net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/i18next-net/bin/Debug/i18next-net.pdb
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net/i18next-net.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {5293FE76-958A-4C12-92BA-9DB2192F463A}
8 | Library
9 | Properties
10 | i18next_net
11 | i18next-net
12 | v4.6.1
13 | 512
14 |
15 |
16 | true
17 | full
18 | false
19 | bin\Debug\
20 | DEBUG;TRACE
21 | prompt
22 | 4
23 |
24 |
25 | pdbonly
26 | true
27 | bin\Release\
28 | TRACE
29 | prompt
30 | 4
31 |
32 |
33 |
34 | ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 | True
53 | True
54 | Resources.resx
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | ResXFileCodeGenerator
64 | Resources.Designer.cs
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net/i18next.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json.Linq;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.IO;
5 | using System.Linq;
6 | using System.Reflection;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 |
10 | namespace i18next_net
11 | {
12 | public class i18next
13 | {
14 | public InitOptions _config { get; set; }
15 | public string currentLanguage { get; set; }
16 |
17 | Dictionary loadedLocales = new Dictionary();
18 |
19 | public string path { get; set; }
20 |
21 | public i18next(InitOptions config)
22 | {
23 | _config = config;
24 |
25 | if (_config.autoDetect)
26 | {
27 | //todo: implement autodetect using CurrentThread Culture blablabla
28 | }
29 |
30 | if (string.IsNullOrWhiteSpace(_config.fallbackLng))
31 | {
32 | throw new Exception("No fallback language defined");
33 | }
34 |
35 |
36 | this.path = new FileInfo(Assembly.GetExecutingAssembly().Location).Directory + "\\" + (_config.localesPath ?? "locales") + "\\";
37 |
38 |
39 | if (_config.preLoadLocales)
40 | {
41 | LoadAllLocales();
42 | }
43 |
44 |
45 | }
46 |
47 | private void LoadAllLocales()
48 | {
49 | var files_found = Directory.EnumerateFiles(this.path, "*.json| *.JSON", SearchOption.AllDirectories);
50 |
51 | foreach (var item in files_found)
52 | {
53 | var file = new FileInfo(item);
54 |
55 | var lng = file.DirectoryName;
56 | var ns = file.FullName.Replace(file.Extension, "");
57 |
58 | LoadLocale(lng, ns);
59 | }
60 | }
61 |
62 | public void changeLanguage(string locale)
63 | {
64 | if (string.IsNullOrWhiteSpace(locale))
65 | {
66 | throw new Exception("Invalid language");
67 | }
68 |
69 |
70 |
71 | currentLanguage = locale;
72 | }
73 |
74 | public void LoadLocale(string lng, string ns)
75 | {
76 | string key = lng + "_" + ns;
77 | if (loadedLocales.ContainsKey(key))
78 | {
79 | return;
80 | }
81 |
82 | switch (_config.localeFileType)
83 | {
84 | case LocaleFileTypeEnum.Resource:
85 | throw new NotImplementedException("Loading using Resource file not implemented");
86 | case LocaleFileTypeEnum.Path:
87 |
88 | string file_path = this.path + lng + "\\" + ns + ".json";
89 | if (!File.Exists(file_path))
90 | {
91 | throw new FileNotFoundException("Locale file not found");
92 | }
93 |
94 | string json = File.ReadAllText(file_path);
95 | loadedLocales.Add(key, json);
96 |
97 | break;
98 | case LocaleFileTypeEnum.Web:
99 | throw new NotImplementedException("Loading using Web path not implemented");
100 | default:
101 | break;
102 | }
103 | }
104 |
105 | public string t(string key, object transpose_prop)
106 | {
107 | // split the key
108 | var array_key = key.Split(':');
109 |
110 | // get the namespace
111 | string ns = array_key[0];
112 |
113 | LoadLocale(currentLanguage, ns);
114 |
115 |
116 | JToken key_value;
117 |
118 | key_value = GetKeyValue(array_key, ns);
119 |
120 | if (key_value == null)
121 | {
122 | //load fallback language
123 | LoadLocale(_config.fallbackLng, ns);
124 |
125 | }
126 | string res = key_value.ToString();
127 |
128 | //continue only if transpose object exists
129 | if (transpose_prop == null)
130 | {
131 | return res;
132 | }
133 |
134 |
135 | //hat trick to serialize an anonymous
136 | var transpose_obj = Newtonsoft.Json.JsonConvert.SerializeObject(transpose_prop);
137 | JObject transpose = JObject.Parse(transpose_obj);
138 |
139 | foreach (var item in transpose)
140 | {
141 | var str_to_replace = "{{" + item.Key + "}}";
142 | res = res.Replace(str_to_replace, item.Value.ToString());
143 | }
144 |
145 | return res;
146 | }
147 |
148 | private JToken GetKeyValue(string[] array_key, string ns)
149 | {
150 | JToken key_value;
151 | string json = loadedLocales[currentLanguage + "_" + ns];
152 | JObject o = JObject.Parse(json);
153 |
154 | key_value = o.SelectToken("$." + array_key[1]);
155 | return key_value;
156 | }
157 | }
158 | }
159 |
--------------------------------------------------------------------------------
/src/i18next-net/i18next-net/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/i18next-net/packages/Newtonsoft.Json.10.0.3/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2007 James Newton-King
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/src/i18next-net/packages/Newtonsoft.Json.10.0.3/Newtonsoft.Json.10.0.3.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/packages/Newtonsoft.Json.10.0.3/Newtonsoft.Json.10.0.3.nupkg
--------------------------------------------------------------------------------
/src/i18next-net/packages/Newtonsoft.Json.10.0.3/lib/net20/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/packages/Newtonsoft.Json.10.0.3/lib/net20/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/src/i18next-net/packages/Newtonsoft.Json.10.0.3/lib/net35/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/packages/Newtonsoft.Json.10.0.3/lib/net35/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/src/i18next-net/packages/Newtonsoft.Json.10.0.3/lib/net40/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/packages/Newtonsoft.Json.10.0.3/lib/net40/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/src/i18next-net/packages/Newtonsoft.Json.10.0.3/lib/net45/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/packages/Newtonsoft.Json.10.0.3/lib/net45/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/src/i18next-net/packages/Newtonsoft.Json.10.0.3/lib/netstandard1.0/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/packages/Newtonsoft.Json.10.0.3/lib/netstandard1.0/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/src/i18next-net/packages/Newtonsoft.Json.10.0.3/lib/netstandard1.3/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/packages/Newtonsoft.Json.10.0.3/lib/netstandard1.3/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/src/i18next-net/packages/Newtonsoft.Json.10.0.3/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/packages/Newtonsoft.Json.10.0.3/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/src/i18next-net/packages/Newtonsoft.Json.10.0.3/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonardobaggio/i18next-net/febc7f79fc57173e0cfe9079d1a3dad25b695e5c/src/i18next-net/packages/Newtonsoft.Json.10.0.3/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/src/i18next-net/packages/Newtonsoft.Json.10.0.3/tools/install.ps1:
--------------------------------------------------------------------------------
1 | param($installPath, $toolsPath, $package, $project)
2 |
3 | # open json.net splash page on package install
4 | # don't open if json.net is installed as a dependency
5 |
6 | try
7 | {
8 | $url = "http://www.newtonsoft.com/json/install?version=" + $package.Version
9 | $dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
10 |
11 | if ($dte2.ActiveWindow.Caption -eq "Package Manager Console")
12 | {
13 | # user is installing from VS NuGet console
14 | # get reference to the window, the console host and the input history
15 | # show webpage if "install-package newtonsoft.json" was last input
16 |
17 | $consoleWindow = $(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow])
18 |
19 | $props = $consoleWindow.GetType().GetProperties([System.Reflection.BindingFlags]::Instance -bor `
20 | [System.Reflection.BindingFlags]::NonPublic)
21 |
22 | $prop = $props | ? { $_.Name -eq "ActiveHostInfo" } | select -first 1
23 | if ($prop -eq $null) { return }
24 |
25 | $hostInfo = $prop.GetValue($consoleWindow)
26 | if ($hostInfo -eq $null) { return }
27 |
28 | $history = $hostInfo.WpfConsole.InputHistory.History
29 |
30 | $lastCommand = $history | select -last 1
31 |
32 | if ($lastCommand)
33 | {
34 | $lastCommand = $lastCommand.Trim().ToLower()
35 | if ($lastCommand.StartsWith("install-package") -and $lastCommand.Contains("newtonsoft.json"))
36 | {
37 | $dte2.ItemOperations.Navigate($url) | Out-Null
38 | }
39 | }
40 | }
41 | else
42 | {
43 | # user is installing from VS NuGet dialog
44 | # get reference to the window, then smart output console provider
45 | # show webpage if messages in buffered console contains "installing...newtonsoft.json" in last operation
46 |
47 | $instanceField = [NuGet.Dialog.PackageManagerWindow].GetField("CurrentInstance", [System.Reflection.BindingFlags]::Static -bor `
48 | [System.Reflection.BindingFlags]::NonPublic)
49 |
50 | $consoleField = [NuGet.Dialog.PackageManagerWindow].GetField("_smartOutputConsoleProvider", [System.Reflection.BindingFlags]::Instance -bor `
51 | [System.Reflection.BindingFlags]::NonPublic)
52 |
53 | if ($instanceField -eq $null -or $consoleField -eq $null) { return }
54 |
55 | $instance = $instanceField.GetValue($null)
56 |
57 | if ($instance -eq $null) { return }
58 |
59 | $consoleProvider = $consoleField.GetValue($instance)
60 | if ($consoleProvider -eq $null) { return }
61 |
62 | $console = $consoleProvider.CreateOutputConsole($false)
63 |
64 | $messagesField = $console.GetType().GetField("_messages", [System.Reflection.BindingFlags]::Instance -bor `
65 | [System.Reflection.BindingFlags]::NonPublic)
66 | if ($messagesField -eq $null) { return }
67 |
68 | $messages = $messagesField.GetValue($console)
69 | if ($messages -eq $null) { return }
70 |
71 | $operations = $messages -split "=============================="
72 |
73 | $lastOperation = $operations | select -last 1
74 |
75 | if ($lastOperation)
76 | {
77 | $lastOperation = $lastOperation.ToLower()
78 |
79 | $lines = $lastOperation -split "`r`n"
80 |
81 | $installMatch = $lines | ? { $_.StartsWith("------- installing...newtonsoft.json ") } | select -first 1
82 |
83 | if ($installMatch)
84 | {
85 | $dte2.ItemOperations.Navigate($url) | Out-Null
86 | }
87 | }
88 | }
89 | }
90 | catch
91 | {
92 | try
93 | {
94 | $pmPane = $dte2.ToolWindows.OutputWindow.OutputWindowPanes.Item("Package Manager")
95 |
96 | $selection = $pmPane.TextDocument.Selection
97 | $selection.StartOfDocument($false)
98 | $selection.EndOfDocument($true)
99 |
100 | if ($selection.Text.StartsWith("Attempting to gather dependencies information for package 'Newtonsoft.Json." + $package.Version + "'"))
101 | {
102 | # don't show on upgrade
103 | if (!$selection.Text.Contains("Removed package"))
104 | {
105 | $dte2.ItemOperations.Navigate($url) | Out-Null
106 | }
107 | }
108 | }
109 | catch
110 | {
111 | # stop potential errors from bubbling up
112 | # worst case the splash page won't open
113 | }
114 | }
115 |
116 | # still yolo
--------------------------------------------------------------------------------